Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / CommonEndpointBehaviorElement.cs / 1 / CommonEndpointBehaviorElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.Configuration; using System.Xml; public partial class CommonEndpointBehaviorElement : ServiceModelExtensionCollectionElement{ public CommonEndpointBehaviorElement() : base(ConfigurationStrings.BehaviorExtensions) { } // Verify that the behavior being added implements IEndpointBehavior 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.IEndpointBehavior).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.ConfigInvalidCommonEndpointBehaviorType, element.ConfigurationElementName, typeof(System.ServiceModel.Description.IEndpointBehavior).FullName), element.ElementInformation.Source, element.ElementInformation.LineNumber)); #pragma warning restore } } base.Add(element); } // Verify that the behavior being added implements IEndpointBehavior 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.IEndpointBehavior).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.ConfigInvalidCommonEndpointBehaviorType, element.ConfigurationElementName, typeof(System.ServiceModel.Description.IEndpointBehavior).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
- ManagedIStream.cs
- StringDictionary.cs
- ContextStack.cs
- MDIClient.cs
- SqlException.cs
- MessagePropertyVariants.cs
- SamlAuthenticationClaimResource.cs
- UriSection.cs
- EventBuilder.cs
- DispatcherOperation.cs
- AmbiguousMatchException.cs
- SoapExtensionStream.cs
- EditorPartCollection.cs
- TriggerCollection.cs
- ApplicationSettingsBase.cs
- EntityClassGenerator.cs
- PointConverter.cs
- DbProviderManifest.cs
- peersecuritysettings.cs
- FunctionMappingTranslator.cs
- PairComparer.cs
- DesignTimeTemplateParser.cs
- WebEvents.cs
- CompletionBookmark.cs
- TextProperties.cs
- ServiceReference.cs
- hwndwrapper.cs
- QuerySubExprEliminator.cs
- CodeConditionStatement.cs
- Byte.cs
- NativeMethods.cs
- TraceRecord.cs
- HttpCachePolicy.cs
- UriScheme.cs
- TextStore.cs
- IPipelineRuntime.cs
- VisualStyleTypesAndProperties.cs
- ByteRangeDownloader.cs
- PointLightBase.cs
- DataGridClipboardHelper.cs
- HeaderedContentControl.cs
- MarkerProperties.cs
- DataBoundControl.cs
- RenderTargetBitmap.cs
- EventListenerClientSide.cs
- ArithmeticException.cs
- Pkcs7Recipient.cs
- Brush.cs
- LogExtentCollection.cs
- ElementProxy.cs
- DataGridAddNewRow.cs
- ToolBarPanel.cs
- MailSettingsSection.cs
- GroupItemAutomationPeer.cs
- FixedSOMTableRow.cs
- XmlQueryCardinality.cs
- Inline.cs
- TreeViewDataItemAutomationPeer.cs
- BindingFormattingDialog.cs
- DiscreteKeyFrames.cs
- ContainerParaClient.cs
- ComPlusServiceLoader.cs
- X509SecurityTokenProvider.cs
- X509SecurityToken.cs
- DatasetMethodGenerator.cs
- SqlStatistics.cs
- DataGridViewEditingControlShowingEventArgs.cs
- AdjustableArrowCap.cs
- ZipIOLocalFileDataDescriptor.cs
- CapacityStreamGeometryContext.cs
- CodeObject.cs
- SingleTagSectionHandler.cs
- FormViewUpdateEventArgs.cs
- Int64AnimationUsingKeyFrames.cs
- SqlMethodAttribute.cs
- SqlStatistics.cs
- SmiRequestExecutor.cs
- RuntimeConfigLKG.cs
- SerializationHelper.cs
- SyntaxCheck.cs
- TextTreeTextElementNode.cs
- Stacktrace.cs
- TcpTransportManager.cs
- DropShadowBitmapEffect.cs
- XmlDataSourceView.cs
- DataKeyCollection.cs
- ServiceBuildProvider.cs
- HttpListenerException.cs
- CommandExpr.cs
- WindowsPrincipal.cs
- ListViewSortEventArgs.cs
- SecurityState.cs
- Stack.cs
- PropertyChangeTracker.cs
- MenuItem.cs
- ByteKeyFrameCollection.cs
- RemoteWebConfigurationHost.cs
- FormsAuthenticationEventArgs.cs
- ArgumentOutOfRangeException.cs
- InputBindingCollection.cs