Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / EndpointBehaviorElement.cs / 1 / EndpointBehaviorElement.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System; using System.ServiceModel; using System.Collections.Generic; using System.ComponentModel; using System.Configuration; using System.Globalization; using System.Xml; public partial class EndpointBehaviorElement : NamedServiceModelExtensionCollectionElement{ public EndpointBehaviorElement() : this(null) { } public EndpointBehaviorElement(string name) : base(ConfigurationStrings.BehaviorExtensions, name) { } // 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.ConfigInvalidEndpointBehaviorType, element.ConfigurationElementName, this.Name), 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.ConfigInvalidEndpointBehaviorType, element.ConfigurationElementName, this.Name), 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
- _ConnectStream.cs
- GlobalizationSection.cs
- LayoutDump.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- VirtualDirectoryMapping.cs
- SoapInteropTypes.cs
- MatrixTransform.cs
- ConsumerConnectionPoint.cs
- AssemblyCollection.cs
- TrayIconDesigner.cs
- Instrumentation.cs
- HttpRequestWrapper.cs
- DataBoundControl.cs
- ListDictionaryInternal.cs
- MultiBinding.cs
- LayoutTableCell.cs
- VisualTreeHelper.cs
- KeyboardNavigation.cs
- AspNetPartialTrustHelpers.cs
- RequestCachePolicyConverter.cs
- SerializationAttributes.cs
- MenuItemBindingCollection.cs
- MetadataCache.cs
- TreeNode.cs
- XmlAttributes.cs
- DataGridViewRowHeightInfoNeededEventArgs.cs
- SecureStringHasher.cs
- VScrollProperties.cs
- TracePayload.cs
- ResourceType.cs
- DataGridViewIntLinkedList.cs
- XsltInput.cs
- GroupBox.cs
- SecurityContext.cs
- FilteredDataSetHelper.cs
- DateTimeOffsetConverter.cs
- ReachDocumentReferenceSerializer.cs
- HttpEncoderUtility.cs
- ScriptHandlerFactory.cs
- ClickablePoint.cs
- ListViewDeleteEventArgs.cs
- BitmapCodecInfo.cs
- ComponentDispatcher.cs
- InstanceHandle.cs
- PeerResolverElement.cs
- ConfigUtil.cs
- CFGGrammar.cs
- XmlSchemaAnnotation.cs
- WinFormsSpinner.cs
- ImpersonateTokenRef.cs
- CharacterBuffer.cs
- XNodeNavigator.cs
- PlaceHolder.cs
- DefaultTypeArgumentAttribute.cs
- AlgoModule.cs
- KernelTypeValidation.cs
- SoapBinding.cs
- Catch.cs
- ReadWriteObjectLock.cs
- ModuleConfigurationInfo.cs
- PasswordRecoveryAutoFormat.cs
- DispatcherTimer.cs
- StylusPlugin.cs
- ExpressionStringBuilder.cs
- SplayTreeNode.cs
- DelegatingTypeDescriptionProvider.cs
- SqlInternalConnection.cs
- BulletChrome.cs
- ListViewGroupConverter.cs
- ResourceWriter.cs
- DataKey.cs
- sitestring.cs
- TouchFrameEventArgs.cs
- parserscommon.cs
- LinearGradientBrush.cs
- LicFileLicenseProvider.cs
- XPathSelfQuery.cs
- Pen.cs
- InputScope.cs
- WindowsButton.cs
- TransformerConfigurationWizardBase.cs
- Activity.cs
- ValidationSummaryDesigner.cs
- MergeFailedEvent.cs
- FragmentQuery.cs
- EntityDataSourceContainerNameConverter.cs
- GridViewUpdateEventArgs.cs
- ThreadAttributes.cs
- Point3DCollectionConverter.cs
- AnnotationDocumentPaginator.cs
- ParenthesizePropertyNameAttribute.cs
- ListComponentEditorPage.cs
- MethodCallConverter.cs
- TableItemPattern.cs
- Help.cs
- XmlSchemaSimpleTypeRestriction.cs
- FormsAuthenticationUserCollection.cs
- Nodes.cs
- PathTooLongException.cs
- XPathNavigatorKeyComparer.cs