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
- HandleCollector.cs
- TypeGenericEnumerableViewSchema.cs
- XPathDocumentIterator.cs
- CommonObjectSecurity.cs
- ToolStripOverflowButton.cs
- CharacterBufferReference.cs
- DoubleAnimationUsingKeyFrames.cs
- CommentEmitter.cs
- RoutedEventValueSerializer.cs
- TCPListener.cs
- RegexWorker.cs
- BooleanAnimationUsingKeyFrames.cs
- HtmlFormAdapter.cs
- WeakReferenceEnumerator.cs
- AuthenticodeSignatureInformation.cs
- _NTAuthentication.cs
- LineBreak.cs
- DesignerProperties.cs
- TdsParser.cs
- WindowsListView.cs
- PageSettings.cs
- Validator.cs
- FormsAuthenticationEventArgs.cs
- UnsafeNativeMethods.cs
- BuildManagerHost.cs
- AlignmentYValidation.cs
- StringConverter.cs
- SecurityCriticalDataForSet.cs
- LambdaReference.cs
- MapPathBasedVirtualPathProvider.cs
- DatatypeImplementation.cs
- InputLanguageProfileNotifySink.cs
- ListBase.cs
- Win32.cs
- WindowsGraphicsCacheManager.cs
- FlowDocumentPage.cs
- AsymmetricSecurityBindingElement.cs
- IntegerValidator.cs
- FontNameEditor.cs
- SHA512CryptoServiceProvider.cs
- EventMappingSettingsCollection.cs
- QueryResult.cs
- Double.cs
- Int32Storage.cs
- Configuration.cs
- SynchronizingStream.cs
- DynamicValueConverter.cs
- ImageSource.cs
- activationcontext.cs
- TransactionBridgeSection.cs
- SqlClientPermission.cs
- DocumentSchemaValidator.cs
- DataControlReferenceCollection.cs
- Keywords.cs
- SelectionPattern.cs
- InnerItemCollectionView.cs
- DataTableMapping.cs
- _BasicClient.cs
- InstanceKeyCollisionException.cs
- SystemTcpConnection.cs
- SqlXml.cs
- PackageFilter.cs
- PropertyKey.cs
- Point3DConverter.cs
- BitmapCache.cs
- WebPartHeaderCloseVerb.cs
- HostProtectionException.cs
- DeclaredTypeElement.cs
- ControlFilterExpression.cs
- KnownBoxes.cs
- ResourceAssociationSet.cs
- TrackBarDesigner.cs
- SQLConvert.cs
- TextSerializer.cs
- DrawingGroup.cs
- AmbientLight.cs
- Byte.cs
- Baml2006ReaderFrame.cs
- AdPostCacheSubstitution.cs
- ListChangedEventArgs.cs
- GlyphElement.cs
- UnsafeNativeMethods.cs
- RequestCache.cs
- DrawingImage.cs
- MachineKeyConverter.cs
- LinkArea.cs
- SqlAggregateChecker.cs
- OrderByBuilder.cs
- XmlFileEditor.cs
- x509store.cs
- EntityClassGenerator.cs
- WebResponse.cs
- DocumentGridContextMenu.cs
- StrongNameUtility.cs
- DataGridViewCellLinkedList.cs
- CodeDirectiveCollection.cs
- MissingFieldException.cs
- MatrixStack.cs
- TextBox.cs
- DesignerVerbToolStripMenuItem.cs