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
- OperatingSystem.cs
- TableRow.cs
- DataBindingExpressionBuilder.cs
- TriggerCollection.cs
- XPathDocumentBuilder.cs
- QueuePathDialog.cs
- CustomErrorCollection.cs
- SessionStateSection.cs
- JoinSymbol.cs
- ClickablePoint.cs
- SessionPageStatePersister.cs
- BooleanExpr.cs
- DataGridRelationshipRow.cs
- initElementDictionary.cs
- HttpCapabilitiesSectionHandler.cs
- DispatcherProcessingDisabled.cs
- HMAC.cs
- PeerNameRecordCollection.cs
- Section.cs
- IsolationInterop.cs
- Image.cs
- FtpWebRequest.cs
- HtmlHistory.cs
- XmlProcessingInstruction.cs
- ProxyElement.cs
- DataServiceHostFactory.cs
- GAC.cs
- Evaluator.cs
- TextBoxAutoCompleteSourceConverter.cs
- ExpressionEditorAttribute.cs
- SaveWorkflowAsyncResult.cs
- XmlSchemaAttributeGroup.cs
- EntityTypeBase.cs
- ToolStripKeyboardHandlingService.cs
- ModuleBuilder.cs
- ListItemConverter.cs
- ScrollChangedEventArgs.cs
- _FtpDataStream.cs
- WinFormsSecurity.cs
- FlowNode.cs
- AsyncDataRequest.cs
- DeflateStream.cs
- SettingsBindableAttribute.cs
- TrustLevel.cs
- WinInetCache.cs
- AutoResetEvent.cs
- FloaterParagraph.cs
- XPathPatternParser.cs
- URLAttribute.cs
- CacheSection.cs
- RowCache.cs
- SimplePropertyEntry.cs
- HttpPostedFileBase.cs
- ValueType.cs
- GAC.cs
- DetailsViewUpdateEventArgs.cs
- LocalBuilder.cs
- MemberDescriptor.cs
- Win32.cs
- IPGlobalProperties.cs
- StylusTouchDevice.cs
- TextRunCacheImp.cs
- ExpressionBuilder.cs
- BamlResourceContent.cs
- MultipleViewProviderWrapper.cs
- ProcessRequestAsyncResult.cs
- RectAnimationBase.cs
- EntityDataSourceWizardForm.cs
- followingsibling.cs
- BitmapEffect.cs
- XmlValidatingReader.cs
- ByteAnimationBase.cs
- AsyncDataRequest.cs
- FormViewInsertedEventArgs.cs
- Normalization.cs
- CompilationLock.cs
- ExpressionNode.cs
- Mutex.cs
- DataControlFieldCell.cs
- VariantWrapper.cs
- DataGridViewTextBoxColumn.cs
- BufferedGenericXmlSecurityToken.cs
- ConfigurationSettings.cs
- XPathBuilder.cs
- Baml2006ReaderSettings.cs
- RegexTree.cs
- PlanCompiler.cs
- AssemblySettingAttributes.cs
- PartialTrustHelpers.cs
- XmlElementAttributes.cs
- DBSchemaTable.cs
- RotateTransform3D.cs
- IgnoreFileBuildProvider.cs
- ThreadAttributes.cs
- SignerInfo.cs
- PageParserFilter.cs
- WhitespaceRule.cs
- PieceDirectory.cs
- SqlOuterApplyReducer.cs
- ContentWrapperAttribute.cs