Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ServiceBehaviorElement.cs / 1 / ServiceBehaviorElement.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 ServiceBehaviorElement : NamedServiceModelExtensionCollectionElement{ public ServiceBehaviorElement() : this(null) { } public ServiceBehaviorElement(string name) : base(ConfigurationStrings.BehaviorExtensions, name) { } // Verify that the behavior being added implements IServiceBehavior 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.IServiceBehavior).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.ConfigInvalidServiceBehaviorType, element.ConfigurationElementName, this.Name), element.ElementInformation.Source, element.ElementInformation.LineNumber)); #pragma warning restore } } base.Add(element); } // Verify that the behavior being added implements IServiceBehavior 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.IServiceBehavior).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.ConfigInvalidServiceBehaviorType, element.ConfigurationElementName, this.Name), element.ElementInformation.Source, element.ElementInformation.LineNumber)); #pragma warning restore } } return base.CanAdd(element); } protected override void DeserializeElement(XmlReader reader, bool serializeCollectionKey) { base.DeserializeElement(reader, serializeCollectionKey); } } } // 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
- ScrollData.cs
- CodeMemberField.cs
- DeploymentExceptionMapper.cs
- ResetableIterator.cs
- EventEntry.cs
- ItemDragEvent.cs
- DocumentViewer.cs
- BaseParaClient.cs
- FlowDocumentReaderAutomationPeer.cs
- ListViewAutomationPeer.cs
- RequestCacheEntry.cs
- ADRole.cs
- UseManagedPresentationElement.cs
- SchemaElementLookUpTableEnumerator.cs
- CategoryState.cs
- DoubleLink.cs
- BrowserInteropHelper.cs
- CustomValidator.cs
- PassportAuthenticationEventArgs.cs
- BevelBitmapEffect.cs
- EffectiveValueEntry.cs
- InheritablePropertyChangeInfo.cs
- GeometryDrawing.cs
- PrePostDescendentsWalker.cs
- BodyGlyph.cs
- DataBindingCollection.cs
- ReadOnlyMetadataCollection.cs
- WmpBitmapEncoder.cs
- ByteStorage.cs
- RegexFCD.cs
- PersistenceTypeAttribute.cs
- UriParserTemplates.cs
- XmlTextEncoder.cs
- TextTreePropertyUndoUnit.cs
- SponsorHelper.cs
- MD5.cs
- ThumbButtonInfoCollection.cs
- SpecularMaterial.cs
- AstTree.cs
- KeyedCollection.cs
- KeyboardNavigation.cs
- AtomServiceDocumentSerializer.cs
- DataGridViewColumnCollection.cs
- CornerRadiusConverter.cs
- TriggerBase.cs
- WebPartCatalogAddVerb.cs
- WebConfigurationHost.cs
- ClientData.cs
- SortedDictionary.cs
- TypeSource.cs
- Matrix.cs
- AutomationIdentifierGuids.cs
- GridViewUpdatedEventArgs.cs
- DeclaredTypeElementCollection.cs
- WaitHandleCannotBeOpenedException.cs
- MembershipPasswordException.cs
- NegotiateStream.cs
- EditorZone.cs
- SoapCodeExporter.cs
- FileEnumerator.cs
- QueryExpr.cs
- XmlIlVisitor.cs
- FixUpCollection.cs
- StatusBarPanelClickEvent.cs
- ObjectPersistData.cs
- ClientSession.cs
- ReaderOutput.cs
- GlobalEventManager.cs
- ExpressionBindingCollection.cs
- HttpWebRequest.cs
- DatasetMethodGenerator.cs
- MsmqInputChannelListener.cs
- SHA1Cng.cs
- SqlBuffer.cs
- KerberosRequestorSecurityToken.cs
- StorageMappingFragment.cs
- ListBindingHelper.cs
- HttpCapabilitiesBase.cs
- PowerEase.cs
- DocumentPageTextView.cs
- VScrollBar.cs
- DebugController.cs
- DispatcherObject.cs
- XmlSchemaElement.cs
- OutOfProcStateClientManager.cs
- CaseExpr.cs
- BulletChrome.cs
- ResXResourceReader.cs
- DataBoundControlHelper.cs
- Shape.cs
- StringPropertyBuilder.cs
- AutomationAttributeInfo.cs
- DoubleAnimationUsingKeyFrames.cs
- XmlValueConverter.cs
- _CommandStream.cs
- RadialGradientBrush.cs
- XmlBindingWorker.cs
- PagedDataSource.cs
- CodeIndexerExpression.cs
- ParseChildrenAsPropertiesAttribute.cs