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
- TextReader.cs
- ForEachAction.cs
- ToolStripPanelRenderEventArgs.cs
- InvalidFilterCriteriaException.cs
- brushes.cs
- SiteMapProvider.cs
- CollaborationHelperFunctions.cs
- PtsContext.cs
- TextParagraphProperties.cs
- RotateTransform3D.cs
- COM2ExtendedTypeConverter.cs
- NetworkInformationException.cs
- ClientRolePrincipal.cs
- processwaithandle.cs
- WorkflowInstanceRecord.cs
- SmtpFailedRecipientsException.cs
- DataControlFieldHeaderCell.cs
- FontStretch.cs
- UnsafeNativeMethods.cs
- EpmContentDeSerializerBase.cs
- recordstatescratchpad.cs
- NumericExpr.cs
- _Events.cs
- SystemIPInterfaceStatistics.cs
- XPathNodeIterator.cs
- TypePresenter.xaml.cs
- RangeValuePatternIdentifiers.cs
- WebProxyScriptElement.cs
- WebServiceErrorEvent.cs
- Operator.cs
- UpdatePanelTrigger.cs
- SettingsBindableAttribute.cs
- DllNotFoundException.cs
- SoapServerMessage.cs
- Rect3D.cs
- ChtmlLinkAdapter.cs
- JsonServiceDocumentSerializer.cs
- Sql8ConformanceChecker.cs
- CompiledQuery.cs
- UpdatePanelControlTrigger.cs
- SiteMap.cs
- AttachedAnnotationChangedEventArgs.cs
- ChannelSinkStacks.cs
- ScriptBehaviorDescriptor.cs
- TaskScheduler.cs
- Byte.cs
- BooleanExpr.cs
- RepeaterItem.cs
- ToolStripItem.cs
- XsltCompileContext.cs
- Pkcs9Attribute.cs
- DnsEndpointIdentity.cs
- TextTreeUndoUnit.cs
- ExtensionWindowResizeGrip.cs
- TextElementCollectionHelper.cs
- Int32Animation.cs
- SecurityKeyIdentifierClause.cs
- ClientApiGenerator.cs
- MethodToken.cs
- Content.cs
- ISAPIRuntime.cs
- NavigationProgressEventArgs.cs
- QueuedDeliveryRequirementsMode.cs
- ProgressBarBrushConverter.cs
- WS2007HttpBindingElement.cs
- ComPersistableTypeElementCollection.cs
- ObjectTag.cs
- AttachedPropertyInfo.cs
- CryptoStream.cs
- FixedSOMLineRanges.cs
- RunInstallerAttribute.cs
- WebPartDisplayModeCollection.cs
- TimeoutValidationAttribute.cs
- SafeBitVector32.cs
- DesignerActionKeyboardBehavior.cs
- FrameworkRichTextComposition.cs
- CryptoApi.cs
- XmlCompatibilityReader.cs
- InputProviderSite.cs
- ADRoleFactory.cs
- PathTooLongException.cs
- ProfileGroupSettingsCollection.cs
- Point4D.cs
- TransformConverter.cs
- CollectionViewGroupInternal.cs
- RootBuilder.cs
- WindowHideOrCloseTracker.cs
- SchemaNamespaceManager.cs
- HtmlTextBoxAdapter.cs
- SequenceNumber.cs
- Token.cs
- Atom10FeedFormatter.cs
- SamlSubject.cs
- METAHEADER.cs
- Optimizer.cs
- GcSettings.cs
- PlainXmlDeserializer.cs
- AndCondition.cs
- ButtonStandardAdapter.cs
- IntellisenseTextBox.designer.cs