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
- WorkflowQueuingService.cs
- InputBinder.cs
- WbmpConverter.cs
- DispatcherObject.cs
- DateTimeValueSerializerContext.cs
- WebScriptEndpoint.cs
- ListItemsPage.cs
- InstanceStore.cs
- ContextBase.cs
- StylusPoint.cs
- MetadataWorkspace.cs
- RemotingException.cs
- SafeBitVector32.cs
- FormViewInsertEventArgs.cs
- DataGridViewColumn.cs
- SatelliteContractVersionAttribute.cs
- XsltException.cs
- WhiteSpaceTrimStringConverter.cs
- NameValuePermission.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- _ShellExpression.cs
- GeneratedContractType.cs
- LineServices.cs
- AttachedAnnotationChangedEventArgs.cs
- DataGridTextBox.cs
- TerminateWorkflow.cs
- CompoundFileStreamReference.cs
- InstanceData.cs
- SecureConversationDriver.cs
- ZoneLinkButton.cs
- GroupBox.cs
- PrintingPermissionAttribute.cs
- HtmlInputText.cs
- WindowsRichEdit.cs
- XmlMtomWriter.cs
- DataIdProcessor.cs
- SerializationSectionGroup.cs
- XXXOnTypeBuilderInstantiation.cs
- DesignerActionItemCollection.cs
- SmtpCommands.cs
- Stylus.cs
- BitmapEncoder.cs
- Drawing.cs
- ToolStripTemplateNode.cs
- RemotingConfiguration.cs
- HttpValueCollection.cs
- LinqDataSourceDisposeEventArgs.cs
- TextEditorMouse.cs
- GifBitmapDecoder.cs
- FontEditor.cs
- PropertyGridEditorPart.cs
- ProbeMatchesCD1.cs
- WindowsIdentity.cs
- SqlCaseSimplifier.cs
- CodeTypeDelegate.cs
- FormatConvertedBitmap.cs
- HealthMonitoringSection.cs
- DefaultDialogButtons.cs
- LogicalTreeHelper.cs
- Queue.cs
- AutomationAttributeInfo.cs
- ReaderWriterLock.cs
- FlowDocument.cs
- Evidence.cs
- ConstraintStruct.cs
- PerfCounters.cs
- SqlServer2KCompatibilityAnnotation.cs
- BreakRecordTable.cs
- NotifyParentPropertyAttribute.cs
- MissingMethodException.cs
- ToolStripItemTextRenderEventArgs.cs
- MergeFilterQuery.cs
- StyleSheetRefUrlEditor.cs
- ToggleButtonAutomationPeer.cs
- MSAAEventDispatcher.cs
- XPathDescendantIterator.cs
- Errors.cs
- PhoneCall.cs
- AnchoredBlock.cs
- StateDesigner.Helpers.cs
- __Filters.cs
- SecurityContextSecurityToken.cs
- ConstructorBuilder.cs
- RequestQueue.cs
- MaterialGroup.cs
- SQLInt16.cs
- UnsafeNativeMethods.cs
- ReflectionServiceProvider.cs
- NativeActivityContext.cs
- RefType.cs
- DrawingVisual.cs
- MessageSecurityOverMsmq.cs
- RawUIStateInputReport.cs
- TypeGeneratedEventArgs.cs
- Faults.cs
- EventPrivateKey.cs
- ConstrainedDataObject.cs
- HttpListenerException.cs
- JapaneseCalendar.cs
- BamlTreeUpdater.cs