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
- DesignTimeVisibleAttribute.cs
- PropertyGeneratedEventArgs.cs
- OdbcDataReader.cs
- EmptyEnumerator.cs
- CompositeDuplexElement.cs
- Dictionary.cs
- XmlAttributeProperties.cs
- XmlSubtreeReader.cs
- keycontainerpermission.cs
- RegexTree.cs
- PathStreamGeometryContext.cs
- QilInvoke.cs
- BitmapCacheBrush.cs
- HashCodeCombiner.cs
- BulletDecorator.cs
- MachineKeyValidationConverter.cs
- LookupNode.cs
- ModelItemCollection.cs
- OdbcHandle.cs
- DataGridViewCellValueEventArgs.cs
- Rotation3DAnimation.cs
- GroupBoxRenderer.cs
- UnhandledExceptionEventArgs.cs
- WhitespaceRuleLookup.cs
- URLMembershipCondition.cs
- GroupedContextMenuStrip.cs
- ObjectToken.cs
- PasswordBox.cs
- X509Extension.cs
- Model3DGroup.cs
- ExpressionEvaluator.cs
- WeakEventManager.cs
- RecognizedWordUnit.cs
- NodeCounter.cs
- KeySplineConverter.cs
- IERequestCache.cs
- Int32RectConverter.cs
- Vector3dCollection.cs
- XmlBindingWorker.cs
- UnicodeEncoding.cs
- GPStream.cs
- XmlSchemaSimpleType.cs
- NativeObjectSecurity.cs
- LateBoundBitmapDecoder.cs
- TTSEngineProxy.cs
- Component.cs
- AttachedPropertyBrowsableForChildrenAttribute.cs
- SystemFonts.cs
- DataSourceUtil.cs
- WizardStepBase.cs
- SerializationObjectManager.cs
- CollectionConverter.cs
- Peer.cs
- FixedTextPointer.cs
- CompositeFontInfo.cs
- TypeUnloadedException.cs
- Latin1Encoding.cs
- BitmapEffect.cs
- TextContainer.cs
- KeysConverter.cs
- CutCopyPasteHelper.cs
- DependencyPropertyHelper.cs
- FolderBrowserDialog.cs
- StreamInfo.cs
- DynamicPropertyReader.cs
- RootAction.cs
- EdmEntityTypeAttribute.cs
- WhiteSpaceTrimStringConverter.cs
- GenericTextProperties.cs
- DbProviderFactory.cs
- Stylesheet.cs
- SqlProfileProvider.cs
- BamlMapTable.cs
- RadioButtonList.cs
- Model3D.cs
- TraceUtility.cs
- ObservableDictionary.cs
- SqlClientWrapperSmiStreamChars.cs
- CommandDesigner.cs
- DataSourceControl.cs
- TrackingExtract.cs
- SvcFileManager.cs
- DragEventArgs.cs
- SchemaReference.cs
- PrintPreviewControl.cs
- MSHTMLHostUtil.cs
- LookupBindingPropertiesAttribute.cs
- ClientConfigurationSystem.cs
- IdleTimeoutMonitor.cs
- DataGridItem.cs
- ProvidersHelper.cs
- CompatibleComparer.cs
- ObjectListItem.cs
- ValueType.cs
- X509CertificateInitiatorClientCredential.cs
- CodeDOMProvider.cs
- MasterPageBuildProvider.cs
- PathGeometry.cs
- AutoGeneratedFieldProperties.cs
- StylusCaptureWithinProperty.cs