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
- ImageDrawing.cs
- TableLayoutRowStyleCollection.cs
- Paragraph.cs
- TextCollapsingProperties.cs
- SiteMapSection.cs
- TriggerActionCollection.cs
- AssemblyName.cs
- COSERVERINFO.cs
- PrintPreviewControl.cs
- SQLInt64.cs
- PropertyGridView.cs
- COMException.cs
- TransformConverter.cs
- ToolBar.cs
- GridViewRowCollection.cs
- MonthCalendarDesigner.cs
- HtmlElementErrorEventArgs.cs
- NameValueConfigurationCollection.cs
- WebHostedComPlusServiceHost.cs
- InputLangChangeEvent.cs
- StringFormat.cs
- MultiBinding.cs
- ClientBuildManagerCallback.cs
- Byte.cs
- CompilerTypeWithParams.cs
- dsa.cs
- PerCallInstanceContextProvider.cs
- SinglePhaseEnlistment.cs
- SplineQuaternionKeyFrame.cs
- CryptoStream.cs
- SingleTagSectionHandler.cs
- XmlSchemaAttribute.cs
- StorageBasedPackageProperties.cs
- EventMappingSettings.cs
- FormParameter.cs
- SoapWriter.cs
- ButtonStandardAdapter.cs
- CollectionViewProxy.cs
- ChangeInterceptorAttribute.cs
- DynamicAttribute.cs
- StringReader.cs
- AxHostDesigner.cs
- DataGridViewDataErrorEventArgs.cs
- EmptyEnumerator.cs
- DataMisalignedException.cs
- SaveFileDialog.cs
- GenerateTemporaryTargetAssembly.cs
- IndexerNameAttribute.cs
- BuilderPropertyEntry.cs
- EdmSchemaError.cs
- Grid.cs
- shaperfactoryquerycacheentry.cs
- TextSelection.cs
- PreProcessor.cs
- ClaimTypeElement.cs
- TraceContext.cs
- PipelineModuleStepContainer.cs
- PersianCalendar.cs
- PriorityBinding.cs
- InvokeBase.cs
- Timeline.cs
- FigureParaClient.cs
- BuiltInExpr.cs
- DataBindEngine.cs
- StaticSiteMapProvider.cs
- TypeListConverter.cs
- ValidatorAttribute.cs
- Quack.cs
- WebServiceParameterData.cs
- NameValuePermission.cs
- StickyNoteAnnotations.cs
- ScriptControlManager.cs
- AnnotationService.cs
- EngineSite.cs
- Nullable.cs
- WebPartDisplayMode.cs
- DecimalConstantAttribute.cs
- RadioButtonRenderer.cs
- AndCondition.cs
- MemoryPressure.cs
- SpecialTypeDataContract.cs
- HtmlInputButton.cs
- Convert.cs
- BitmapEffectGroup.cs
- DataGridRow.cs
- FunctionDefinition.cs
- PathStreamGeometryContext.cs
- WindowsMenu.cs
- ToolStripButton.cs
- DataGridViewBand.cs
- SQLCharsStorage.cs
- MaterializeFromAtom.cs
- TraceContext.cs
- DataMisalignedException.cs
- baseaxisquery.cs
- ReliableSessionElement.cs
- PkcsMisc.cs
- XNodeNavigator.cs
- BindStream.cs
- ServicesExceptionNotHandledEventArgs.cs