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
- RangeContentEnumerator.cs
- FilterableAttribute.cs
- OletxTransactionFormatter.cs
- DashStyles.cs
- TextParentUndoUnit.cs
- _DisconnectOverlappedAsyncResult.cs
- SafeNativeMethodsMilCoreApi.cs
- ErrorProvider.cs
- DropDownHolder.cs
- PersonalizationStateInfo.cs
- DataGridViewColumnDesignTimeVisibleAttribute.cs
- MenuRendererStandards.cs
- TextFormatter.cs
- formatter.cs
- XmlElementAttribute.cs
- RankException.cs
- SQLSingle.cs
- RouteItem.cs
- DataRelation.cs
- MultilineStringEditor.cs
- ChtmlImageAdapter.cs
- ControlPropertyNameConverter.cs
- KeyTime.cs
- ManipulationDeltaEventArgs.cs
- SmiEventSink.cs
- SafeEventHandle.cs
- SessionParameter.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- PixelShader.cs
- CreateUserWizard.cs
- TextTreeInsertElementUndoUnit.cs
- PassportAuthenticationEventArgs.cs
- HttpHeaderCollection.cs
- NativeMethods.cs
- WebPartZoneBase.cs
- CacheRequest.cs
- ControlPersister.cs
- DataBinder.cs
- WebPartDisplayModeEventArgs.cs
- SqlBinder.cs
- QilBinary.cs
- SelectionEditingBehavior.cs
- PageContentAsyncResult.cs
- BinaryParser.cs
- _LoggingObject.cs
- XmlSchemaSequence.cs
- TextPointerBase.cs
- ClientUrlResolverWrapper.cs
- BufferedGraphics.cs
- safemediahandle.cs
- TextDecoration.cs
- SchemaSetCompiler.cs
- Vector3DAnimationBase.cs
- MasterPageBuildProvider.cs
- Run.cs
- BuildResult.cs
- BaseTreeIterator.cs
- ExpressionBuilderCollection.cs
- SafeEventLogWriteHandle.cs
- FunctionUpdateCommand.cs
- ForeignConstraint.cs
- WebResourceAttribute.cs
- baseshape.cs
- SQLStringStorage.cs
- StrokeNodeOperations2.cs
- DetailsViewUpdateEventArgs.cs
- DataGridTextColumn.cs
- TextEffectCollection.cs
- XmlLoader.cs
- ServerProtocol.cs
- ScriptIgnoreAttribute.cs
- HttpCacheVaryByContentEncodings.cs
- InkCanvasSelectionAdorner.cs
- Line.cs
- StorageComplexPropertyMapping.cs
- IPipelineRuntime.cs
- AjaxFrameworkAssemblyAttribute.cs
- XmlTypeAttribute.cs
- HtmlLink.cs
- SubqueryTrackingVisitor.cs
- DebugManager.cs
- TextTreeUndoUnit.cs
- EventLogEntryCollection.cs
- SqlPersonalizationProvider.cs
- XmlSchemaInfo.cs
- TextTrailingWordEllipsis.cs
- ChameleonKey.cs
- DateTimeConverter2.cs
- DocumentOrderQuery.cs
- ConcurrentBag.cs
- HtmlShimManager.cs
- XamlInt32CollectionSerializer.cs
- RenameRuleObjectDialog.Designer.cs
- DataSourceCollectionBase.cs
- Utility.cs
- ConfigsHelper.cs
- FontClient.cs
- UriExt.cs
- SrgsElementFactory.cs
- DbXmlEnabledProviderManifest.cs