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
- FixedDocument.cs
- ControlsConfig.cs
- XmlSchemaSet.cs
- PersonalizationProvider.cs
- _DigestClient.cs
- XmlUtilWriter.cs
- PathGeometry.cs
- FactoryGenerator.cs
- DiscoveryServiceExtension.cs
- SqlEnums.cs
- StorageTypeMapping.cs
- Rule.cs
- Certificate.cs
- RoutedUICommand.cs
- AuthenticationModuleElementCollection.cs
- ConnectionPool.cs
- XmlSchemaAttribute.cs
- WeakEventManager.cs
- SID.cs
- DesignTimeTemplateParser.cs
- DbConnectionPoolGroupProviderInfo.cs
- Rotation3DAnimationUsingKeyFrames.cs
- ModelChangedEventArgsImpl.cs
- PropertyItemInternal.cs
- RemotingServices.cs
- LinkedResourceCollection.cs
- SplitterDesigner.cs
- HtmlImage.cs
- XmlILCommand.cs
- CookieProtection.cs
- HMACRIPEMD160.cs
- SqlAliaser.cs
- CodeChecksumPragma.cs
- Symbol.cs
- DataControlLinkButton.cs
- WebPartHeaderCloseVerb.cs
- TrustManagerPromptUI.cs
- FixedSOMTable.cs
- ISAPIApplicationHost.cs
- Converter.cs
- ObjectPropertyMapping.cs
- ExtenderHelpers.cs
- KnownColorTable.cs
- DataGridPageChangedEventArgs.cs
- ListItemCollection.cs
- TransformFinalBlockRequest.cs
- SafeEventLogWriteHandle.cs
- XpsTokenContext.cs
- DataReceivedEventArgs.cs
- IdentityReference.cs
- FixedSOMTableRow.cs
- List.cs
- ReadWriteObjectLock.cs
- MetadataArtifactLoaderComposite.cs
- HostProtectionException.cs
- CatalogPartChrome.cs
- CompilerErrorCollection.cs
- PopupRootAutomationPeer.cs
- Preprocessor.cs
- configsystem.cs
- BitmapEffectDrawing.cs
- StrokeNode.cs
- InputLangChangeRequestEvent.cs
- ObjectView.cs
- ClientOperationFormatterProvider.cs
- HTMLTextWriter.cs
- XamlReaderHelper.cs
- EditorBrowsableAttribute.cs
- future.cs
- XhtmlTextWriter.cs
- TypePresenter.xaml.cs
- OpCodes.cs
- SymmetricAlgorithm.cs
- RelationshipConverter.cs
- ToolStripItemImageRenderEventArgs.cs
- TransformCollection.cs
- DocumentReferenceCollection.cs
- InfoCardTraceRecord.cs
- ConfigurationStrings.cs
- MSAANativeProvider.cs
- CodeIndexerExpression.cs
- FlowNode.cs
- RegexCompiler.cs
- ResourcesChangeInfo.cs
- WrappedIUnknown.cs
- ScriptManager.cs
- DataGridViewCellCollection.cs
- Config.cs
- LockCookie.cs
- OleDbErrorCollection.cs
- CodeParameterDeclarationExpressionCollection.cs
- IteratorDescriptor.cs
- RealProxy.cs
- ViewManager.cs
- XmlILConstructAnalyzer.cs
- QilParameter.cs
- BuilderPropertyEntry.cs
- BroadcastEventHelper.cs
- TaskFormBase.cs
- RuntimeIdentifierPropertyAttribute.cs