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
- AttributeUsageAttribute.cs
- CounterSample.cs
- RadialGradientBrush.cs
- DataQuery.cs
- DesignerView.cs
- BitmapSource.cs
- XmlElement.cs
- ComponentEditorPage.cs
- MessageQueuePermission.cs
- HtmlTable.cs
- LinqToSqlWrapper.cs
- CheckBox.cs
- OperatorExpressions.cs
- LineUtil.cs
- TreeViewAutomationPeer.cs
- XmlAttribute.cs
- RuntimeHelpers.cs
- WebServiceErrorEvent.cs
- CellNormalizer.cs
- XmlUtil.cs
- SecurityContextSecurityTokenAuthenticator.cs
- CompositeCollection.cs
- SmiContext.cs
- ToolStripDropDownMenu.cs
- DateTimeFormat.cs
- ToolStripItemCollection.cs
- HttpModuleCollection.cs
- ServiceProviders.cs
- BaseCollection.cs
- TdsParserHelperClasses.cs
- Error.cs
- TextEditorDragDrop.cs
- DbMetaDataCollectionNames.cs
- EnumerableRowCollectionExtensions.cs
- WebBrowsableAttribute.cs
- SettingsProperty.cs
- VisualCollection.cs
- WsdlInspector.cs
- WinFormsComponentEditor.cs
- XamlVector3DCollectionSerializer.cs
- HttpWebResponse.cs
- PerspectiveCamera.cs
- HierarchicalDataBoundControl.cs
- AssemblySettingAttributes.cs
- PerformanceCounterCategory.cs
- OdbcEnvironmentHandle.cs
- SqlProvider.cs
- CompiledELinqQueryState.cs
- DetailsView.cs
- PropertiesTab.cs
- TreeViewBindingsEditorForm.cs
- WindowManager.cs
- FormParameter.cs
- DataGridViewCellStateChangedEventArgs.cs
- Border.cs
- MissingManifestResourceException.cs
- ObjectQueryState.cs
- XomlCompilerParameters.cs
- BuildProviderCollection.cs
- WrapPanel.cs
- dtdvalidator.cs
- LoadWorkflowCommand.cs
- ToolStripOverflowButton.cs
- ObfuscationAttribute.cs
- XsltSettings.cs
- ObjectCacheSettings.cs
- MethodCallExpression.cs
- Semaphore.cs
- XComponentModel.cs
- AvTraceDetails.cs
- ObjectManager.cs
- Condition.cs
- TreeView.cs
- ToolBar.cs
- Membership.cs
- CommonObjectSecurity.cs
- DataGridItemEventArgs.cs
- CapabilitiesUse.cs
- TextContainerChangedEventArgs.cs
- WindowsFormsSynchronizationContext.cs
- RuntimeHelpers.cs
- AsyncResult.cs
- GuidConverter.cs
- PolyBezierSegment.cs
- unsafeIndexingFilterStream.cs
- OdbcErrorCollection.cs
- DoubleAnimationUsingPath.cs
- XmlSchemaFacet.cs
- XmlAttributeCache.cs
- LambdaCompiler.Unary.cs
- DoubleLink.cs
- AppDomainProtocolHandler.cs
- XamlTreeBuilder.cs
- InputScopeAttribute.cs
- CryptoProvider.cs
- OleDbError.cs
- CodeTypeReferenceSerializer.cs
- SQLDateTimeStorage.cs
- ProgressBarRenderer.cs
- ElementFactory.cs