Code:
/ WCF / WCF / 3.5.30729.1 / untmp / Orcas / SP / ndp / cdf / src / WCF / ServiceModel / System / ServiceModel / Configuration / ServicesSection.cs / 1 / ServicesSection.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.ServiceModel.Configuration { using System.Collections; using System.Configuration; using System.Globalization; using System.Reflection; using System.Xml; using System.Security; public sealed partial class ServicesSection : ConfigurationSection, IConfigurationContextProviderInternal { ////// Critical - stores information used in a security decision /// [SecurityCritical] EvaluationContextHelper contextHelper; public ServicesSection() { } [ConfigurationProperty(ConfigurationStrings.DefaultCollectionName, Options = ConfigurationPropertyOptions.IsDefaultCollection)] public ServiceElementCollection Services { get {return (ServiceElementCollection) this[ConfigurationStrings.DefaultCollectionName]; } } internal static ServicesSection GetSection() { return (ServicesSection)ConfigurationHelpers.GetSection(ConfigurationStrings.ServicesSectionPath); } ////// Critical - calls Critical method UnsafeGetSection which elevates in order to fetch config /// caller must guard access to resultant config section /// [SecurityCritical] internal static ServicesSection UnsafeGetSection() { return (ServicesSection)ConfigurationHelpers.UnsafeGetSection(ConfigurationStrings.ServicesSectionPath); } protected override void PostDeserialize() { this.ValidateSection(); base.PostDeserialize(); } void ValidateSection() { ContextInformation context = ConfigurationHelpers.GetEvaluationContext(this); if (context != null) { foreach (ServiceElement service in this.Services) { BehaviorsSection.ValidateServiceBehaviorReference(service.BehaviorConfiguration, context, service); foreach (ServiceEndpointElement endpoint in service.Endpoints) { BehaviorsSection.ValidateEndpointBehaviorReference(endpoint.BehaviorConfiguration, context, endpoint); BindingsSection.ValidateBindingReference(endpoint.Binding, endpoint.BindingConfiguration, context, endpoint); } } } } ////// Critical - accesses critical field contextHelper /// [SecurityCritical] protected override void Reset(ConfigurationElement parentElement) { this.contextHelper.OnReset(parentElement); base.Reset(parentElement); } ContextInformation IConfigurationContextProviderInternal.GetEvaluationContext() { return this.EvaluationContext; } ////// Critical -- accesses critical field contextHelper /// RequiresReview -- the return value will be used for a security decision -- see comment in interface definition /// [SecurityCritical] ContextInformation IConfigurationContextProviderInternal.GetOriginalEvaluationContext() { return this.contextHelper.GetOriginalContext(this); } } } // 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
- DoubleAnimationClockResource.cs
- ClientBuildManagerCallback.cs
- TripleDESCryptoServiceProvider.cs
- IPipelineRuntime.cs
- MdImport.cs
- CustomAttributeSerializer.cs
- MenuAutoFormat.cs
- ReflectTypeDescriptionProvider.cs
- DesignerUtility.cs
- DataServiceRequestOfT.cs
- ExpandCollapseProviderWrapper.cs
- ClickablePoint.cs
- PageContentCollection.cs
- InvalidPropValue.cs
- ErrorHandler.cs
- FixedSOMLineCollection.cs
- XpsPackagingPolicy.cs
- WorkflowTransactionService.cs
- CompilerHelpers.cs
- ThreadExceptionDialog.cs
- DBConnection.cs
- TdsParserStateObject.cs
- SchemaSetCompiler.cs
- TreeView.cs
- DataObjectFieldAttribute.cs
- EntityDataSourceQueryBuilder.cs
- WebSysDescriptionAttribute.cs
- TextDecorations.cs
- AccessText.cs
- CompileXomlTask.cs
- ServiceRoute.cs
- ReadOnlyDictionary.cs
- WebPart.cs
- EffectiveValueEntry.cs
- UserControlAutomationPeer.cs
- XmlDocumentSerializer.cs
- WindowsProgressbar.cs
- FunctionDescription.cs
- TableLayoutStyle.cs
- WebPartConnectVerb.cs
- ConcatQueryOperator.cs
- EpmSourceTree.cs
- MenuItemBinding.cs
- PrivateFontCollection.cs
- BoundColumn.cs
- Operators.cs
- KeyInfo.cs
- DefaultTextStoreTextComposition.cs
- CheckBox.cs
- CompositeDataBoundControl.cs
- DependencyObjectValidator.cs
- DeferredSelectedIndexReference.cs
- SettingsPropertyWrongTypeException.cs
- FlowDocumentPage.cs
- Substitution.cs
- FacetValueContainer.cs
- DataGridColumn.cs
- Rect.cs
- MetroSerializationManager.cs
- WebPartDescriptionCollection.cs
- UIElementAutomationPeer.cs
- dtdvalidator.cs
- x509utils.cs
- NgenServicingAttributes.cs
- TextPenaltyModule.cs
- Binding.cs
- ipaddressinformationcollection.cs
- SecuritySessionSecurityTokenAuthenticator.cs
- ContextMenuStripActionList.cs
- TakeOrSkipQueryOperator.cs
- StringResourceManager.cs
- WithParamAction.cs
- DataGridView.cs
- BadImageFormatException.cs
- RepeaterCommandEventArgs.cs
- XmlNamespaceDeclarationsAttribute.cs
- ChildChangedEventArgs.cs
- ImageMapEventArgs.cs
- MaskedTextBoxTextEditorDropDown.cs
- FloaterBaseParaClient.cs
- SBCSCodePageEncoding.cs
- ZoneLinkButton.cs
- XmlDataLoader.cs
- FrameworkElementAutomationPeer.cs
- StringUtil.cs
- CompositionAdorner.cs
- PersonalizationProviderHelper.cs
- GridViewDeletedEventArgs.cs
- ColorBlend.cs
- EntityDataSourceDesignerHelper.cs
- DataGridHeaderBorder.cs
- BamlVersionHeader.cs
- ComPlusDiagnosticTraceRecords.cs
- SqlTrackingService.cs
- safex509handles.cs
- Effect.cs
- TreeView.cs
- RelationshipFixer.cs
- CallId.cs
- ProcessHostFactoryHelper.cs