Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ClientSection.cs / 1 / ClientSection.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Configuration; using System.ServiceModel.Channels; using System.Globalization; using System.Reflection; using System.Security; public sealed partial class ClientSection : ConfigurationSection, IConfigurationContextProviderInternal { public ClientSection() { } [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefaultCollection)] public ChannelEndpointElementCollection Endpoints { get {return (ChannelEndpointElementCollection) this[ConfigurationStrings.DefaultCollectionName]; } } [ConfigurationProperty(ConfigurationStrings.Metadata)] public MetadataElement Metadata { get {return (MetadataElement) this[ConfigurationStrings.Metadata]; } } internal static ClientSection GetSection() { return (ClientSection)ConfigurationHelpers.GetSection(ConfigurationStrings.ClientSectionPath); } ////// Critical - calls Critical method UnsafeGetSection which elevates in order to fetch config /// caller must guard access to resultant config section /// [SecurityCritical] internal static ClientSection UnsafeGetSection() { return (ClientSection)ConfigurationHelpers.UnsafeGetSection(ConfigurationStrings.ClientSectionPath); } protected override void InitializeDefault() { this.Metadata.SetDefaults(); } protected override void PostDeserialize() { this.ValidateSection(); base.PostDeserialize(); } void ValidateSection() { ContextInformation context = ConfigurationHelpers.GetEvaluationContext(this); if (context != null) { foreach (ChannelEndpointElement endpoint in this.Endpoints) { BehaviorsSection.ValidateEndpointBehaviorReference(endpoint.BehaviorConfiguration, context, endpoint); BindingsSection.ValidateBindingReference(endpoint.Binding, endpoint.BindingConfiguration, context, endpoint); } } } ContextInformation IConfigurationContextProviderInternal.GetEvaluationContext() { return this.EvaluationContext; } ////// RequiresReview - the return value will be used for a security decision -- see comment in interface definition /// ContextInformation IConfigurationContextProviderInternal.GetOriginalEvaluationContext() { DiagnosticUtility.DebugAssert("Not implemented: IConfigurationContextProviderInternal.GetOriginalEvaluationContext"); return null; } } } // 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
- ColorConverter.cs
- XsltCompileContext.cs
- DynamicResourceExtension.cs
- Int64AnimationUsingKeyFrames.cs
- ContainsRowNumberChecker.cs
- DataServiceEntityAttribute.cs
- FlagPanel.cs
- ButtonFlatAdapter.cs
- WindowsIPAddress.cs
- DataRecordInternal.cs
- CodeArgumentReferenceExpression.cs
- RoleProviderPrincipal.cs
- NumericUpDown.cs
- ActivityExecutorDelegateInfo.cs
- CacheChildrenQuery.cs
- RegisteredHiddenField.cs
- Convert.cs
- RichTextBox.cs
- MappingItemCollection.cs
- CaseInsensitiveHashCodeProvider.cs
- SqlServer2KCompatibilityCheck.cs
- ServiceModelExtensionCollectionElement.cs
- CodeMemberMethod.cs
- XsltSettings.cs
- ScrollChrome.cs
- HtmlInputControl.cs
- RemoteWebConfigurationHostStream.cs
- ProcessThread.cs
- Condition.cs
- ExpressionBindingCollection.cs
- ExpressionDumper.cs
- PropertyEmitterBase.cs
- TypeElementCollection.cs
- XmlSchemaParticle.cs
- DataSpaceManager.cs
- DbDeleteCommandTree.cs
- Application.cs
- ProfileBuildProvider.cs
- xml.cs
- SoapFaultCodes.cs
- ImagingCache.cs
- CompositionCommandSet.cs
- ButtonBase.cs
- BlurBitmapEffect.cs
- DoubleAnimationUsingPath.cs
- CaseInsensitiveHashCodeProvider.cs
- ImageDrawing.cs
- AutoScrollHelper.cs
- CompilationRelaxations.cs
- TranslateTransform.cs
- PartialCachingControl.cs
- OdbcInfoMessageEvent.cs
- WorkflowWebService.cs
- SelectionPattern.cs
- HwndHostAutomationPeer.cs
- CustomValidator.cs
- DeferrableContentConverter.cs
- AppDomainManager.cs
- VerificationAttribute.cs
- Button.cs
- _DisconnectOverlappedAsyncResult.cs
- GraphicsState.cs
- RequestCache.cs
- HttpResponse.cs
- WinFormsSecurity.cs
- FrameAutomationPeer.cs
- XmlCharacterData.cs
- AlgoModule.cs
- Transform.cs
- MobileRedirect.cs
- ClusterUtils.cs
- MarginsConverter.cs
- ReadOnlyDataSource.cs
- RoleGroupCollection.cs
- EdmComplexTypeAttribute.cs
- XmlTextReader.cs
- SplineKeyFrames.cs
- DesignerCommandAdapter.cs
- FormsAuthenticationUserCollection.cs
- HttpHandlerAction.cs
- SafeHandles.cs
- UInt64Converter.cs
- TrustVersion.cs
- EndpointInstanceProvider.cs
- XsltQilFactory.cs
- Stackframe.cs
- Queue.cs
- ConsumerConnectionPointCollection.cs
- VBCodeProvider.cs
- AssemblyInfo.cs
- AutomationElementCollection.cs
- PropertyItemInternal.cs
- SQLMembershipProvider.cs
- QilBinary.cs
- TransformerConfigurationWizardBase.cs
- Rectangle.cs
- SelectionEditingBehavior.cs
- DetailsViewRowCollection.cs
- X509ThumbprintKeyIdentifierClause.cs
- FusionWrap.cs