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
- ConnectionStringsSection.cs
- TextRangeEditTables.cs
- ErrorFormatterPage.cs
- ExeContext.cs
- updateconfighost.cs
- Rule.cs
- NGCSerializationManagerAsync.cs
- SmtpFailedRecipientsException.cs
- MenuAdapter.cs
- FrameworkElementFactoryMarkupObject.cs
- TCEAdapterGenerator.cs
- ViewBox.cs
- EntityDataSourceContainerNameItem.cs
- EffectiveValueEntry.cs
- DBSqlParserTableCollection.cs
- SQLResource.cs
- IssuedTokenClientBehaviorsElementCollection.cs
- CodeComment.cs
- HtmlInputFile.cs
- RuntimeHandles.cs
- UdpContractFilterBehavior.cs
- DefaultHttpHandler.cs
- KeyProperty.cs
- InfoCardBaseException.cs
- ListBindingHelper.cs
- ItemCheckedEvent.cs
- NotFiniteNumberException.cs
- PublisherMembershipCondition.cs
- SettingsPropertyValueCollection.cs
- ToolStrip.cs
- DataDocumentXPathNavigator.cs
- TcpDuplicateContext.cs
- ExtractorMetadata.cs
- CheckBoxBaseAdapter.cs
- DataGridViewTextBoxCell.cs
- WebPartZone.cs
- SchemaTypeEmitter.cs
- OutputCacheSettings.cs
- SecurityCriticalDataForSet.cs
- _SslStream.cs
- PropertyGroupDescription.cs
- SecurityDocument.cs
- Int64.cs
- Style.cs
- TypeUtils.cs
- NonNullItemCollection.cs
- DataGridViewCheckBoxColumn.cs
- MessageEnumerator.cs
- TypeDescriptionProvider.cs
- NoResizeHandleGlyph.cs
- ActivityDefaults.cs
- DebugHandleTracker.cs
- InternalBase.cs
- StickyNoteContentControl.cs
- UInt32Converter.cs
- PerformanceCounterPermissionAttribute.cs
- XsltContext.cs
- SchemeSettingElement.cs
- PowerEase.cs
- WebColorConverter.cs
- ZipIOLocalFileHeader.cs
- XPathAncestorQuery.cs
- GCHandleCookieTable.cs
- FieldDescriptor.cs
- SqlDataSourceRefreshSchemaForm.cs
- TransactionScopeDesigner.cs
- xmlformatgeneratorstatics.cs
- OleDbCommand.cs
- followingquery.cs
- BulletedListEventArgs.cs
- latinshape.cs
- WindowsListViewItemStartMenu.cs
- DbReferenceCollection.cs
- ExecutedRoutedEventArgs.cs
- DriveNotFoundException.cs
- EntityClientCacheKey.cs
- Expression.cs
- IEnumerable.cs
- TraceFilter.cs
- AsyncPostBackTrigger.cs
- SecurityDocument.cs
- DataServiceConfiguration.cs
- DocumentPageViewAutomationPeer.cs
- ArrayList.cs
- Attributes.cs
- DataGridViewRowEventArgs.cs
- ChildrenQuery.cs
- ResourceType.cs
- UshortList2.cs
- Cell.cs
- ProxyOperationRuntime.cs
- Ticks.cs
- XmlAnyAttributeAttribute.cs
- HttpWrapper.cs
- NumericUpDown.cs
- HttpContextServiceHost.cs
- MoveSizeWinEventHandler.cs
- _LoggingObject.cs
- AttributeData.cs
- SqlXmlStorage.cs