Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / CommonServiceBehaviorElement.cs / 1 / CommonServiceBehaviorElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.Configuration; using System.Xml; public partial class CommonServiceBehaviorElement : ServiceModelExtensionCollectionElement{ public CommonServiceBehaviorElement() : base(ConfigurationStrings.BehaviorExtensions) { } // Verify that the behavior being added implements IServiceBehavior public override void Add(BehaviorExtensionElement element) { // If element is null, let base.Add() throw for consistency reasons if (null != element) { if (!typeof(System.ServiceModel.Description.IServiceBehavior).IsAssignableFrom(element.BehaviorType)) { #pragma warning disable 56506 //[....]; element.ElementInformation is guaranteed to be non-null(System.Configuration) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigInvalidCommonServiceBehaviorType, element.ConfigurationElementName, typeof(System.ServiceModel.Description.IServiceBehavior).FullName), element.ElementInformation.Source, element.ElementInformation.LineNumber)); #pragma warning restore } } base.Add(element); } // Verify that the behavior being added implements IServiceBehavior public override bool CanAdd(BehaviorExtensionElement element) { // If element is null, let base.CanAdd() throw for consistency reasons if (null != element) { if (!typeof(System.ServiceModel.Description.IServiceBehavior).IsAssignableFrom(element.BehaviorType)) { #pragma warning disable 56506 //[....]; element.ElementInformation is guaranteed to be non-null(System.Configuration) throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new ConfigurationErrorsException(SR.GetString(SR.ConfigInvalidCommonServiceBehaviorType, element.ConfigurationElementName, typeof(System.ServiceModel.Description.IServiceBehavior).FullName), element.ElementInformation.Source, element.ElementInformation.LineNumber)); #pragma warning restore } } return base.CanAdd(element); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- Filter.cs
- Error.cs
- EventProviderWriter.cs
- VisualTreeHelper.cs
- DebuggerAttributes.cs
- SQLDoubleStorage.cs
- SoapClientMessage.cs
- ToolboxCategory.cs
- SQLResource.cs
- ArglessEventHandlerProxy.cs
- WebEvents.cs
- BufferedOutputStream.cs
- InkCanvasInnerCanvas.cs
- RegistryKey.cs
- ImageSource.cs
- ListViewUpdateEventArgs.cs
- Listbox.cs
- TableRowGroupCollection.cs
- XmlSchemaSimpleTypeUnion.cs
- URL.cs
- WindowsFormsEditorServiceHelper.cs
- TerminateDesigner.cs
- CoTaskMemHandle.cs
- RequestQueryParser.cs
- RowBinding.cs
- LineSegment.cs
- backend.cs
- DragEvent.cs
- UntrustedRecipientException.cs
- Configuration.cs
- ConcurrentDictionary.cs
- InternalDispatchObject.cs
- ProviderUtil.cs
- MessageBox.cs
- DropSource.cs
- NamedPermissionSet.cs
- PropertyDescriptorCollection.cs
- RadialGradientBrush.cs
- TypedTableBase.cs
- StandardCommands.cs
- CounterCreationData.cs
- CollectionAdapters.cs
- ItemCheckedEvent.cs
- ComboBoxAutomationPeer.cs
- DataList.cs
- UserControl.cs
- Debug.cs
- QilScopedVisitor.cs
- ClientRuntimeConfig.cs
- SpellerInterop.cs
- PopupControlService.cs
- DoubleLinkList.cs
- SqlCommand.cs
- DurableInstanceContextProvider.cs
- FirstQueryOperator.cs
- ManagedWndProcTracker.cs
- RealProxy.cs
- PropertyInfoSet.cs
- ProviderSettings.cs
- LocationSectionRecord.cs
- HttpStreamMessage.cs
- ContextStack.cs
- ScopeElement.cs
- TraceEventCache.cs
- MobileErrorInfo.cs
- SQLResource.cs
- DebugInfoGenerator.cs
- mediapermission.cs
- ActivityInfo.cs
- PrimarySelectionGlyph.cs
- MessagingDescriptionAttribute.cs
- MasterPageBuildProvider.cs
- ObjectNavigationPropertyMapping.cs
- CrossContextChannel.cs
- DataGridRow.cs
- IncrementalHitTester.cs
- PageStatePersister.cs
- WaitingCursor.cs
- Interop.cs
- QilParameter.cs
- TreeViewHitTestInfo.cs
- Control.cs
- PointLightBase.cs
- EntityClassGenerator.cs
- GridLengthConverter.cs
- MaterialGroup.cs
- OleDbSchemaGuid.cs
- UserControl.cs
- MessagePropertyVariants.cs
- RegexBoyerMoore.cs
- DrawingAttributesDefaultValueFactory.cs
- SimpleApplicationHost.cs
- EnumConverter.cs
- IndentTextWriter.cs
- SubMenuStyleCollection.cs
- FileNotFoundException.cs
- AssemblyContextControlItem.cs
- XmlWriterSettings.cs
- LineServices.cs
- CqlQuery.cs