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
- XmlArrayAttribute.cs
- EditorZoneBase.cs
- AppSettingsExpressionBuilder.cs
- SafeCertificateStore.cs
- XmlObjectSerializerWriteContext.cs
- NativeMethods.cs
- RegistryKey.cs
- SemanticAnalyzer.cs
- PersonalizationProvider.cs
- CodeTypeConstructor.cs
- ErrorLog.cs
- DataObjectPastingEventArgs.cs
- CompoundFileStorageReference.cs
- TypeDelegator.cs
- SamlAuthenticationClaimResource.cs
- XsltContext.cs
- CodeComment.cs
- DataControlImageButton.cs
- Configuration.cs
- EmptyReadOnlyDictionaryInternal.cs
- RtfToken.cs
- ScaleTransform.cs
- ConfigXmlReader.cs
- MaterializeFromAtom.cs
- SmtpTransport.cs
- ObjectConverter.cs
- CodeIdentifiers.cs
- EventLogEntryCollection.cs
- BigInt.cs
- SqlBulkCopyColumnMapping.cs
- WebConfigurationHostFileChange.cs
- GridToolTip.cs
- AssemblyInfo.cs
- ReceiveSecurityHeader.cs
- PageContentAsyncResult.cs
- TextAdaptor.cs
- Mutex.cs
- GeneralTransform3D.cs
- InvalidComObjectException.cs
- SqlInternalConnectionSmi.cs
- SafeFileMappingHandle.cs
- AsyncPostBackTrigger.cs
- Token.cs
- _ConnectOverlappedAsyncResult.cs
- ValidationSummary.cs
- Panel.cs
- AssignDesigner.xaml.cs
- ResourceReferenceKeyNotFoundException.cs
- NullableLongAverageAggregationOperator.cs
- DataGridItemCollection.cs
- Compress.cs
- ConfigurationValue.cs
- TextServicesPropertyRanges.cs
- Membership.cs
- BitmapEffectGeneralTransform.cs
- TraceHandlerErrorFormatter.cs
- SequenceQuery.cs
- AssemblyHelper.cs
- PasswordRecovery.cs
- AppDomainAttributes.cs
- XmlDataProvider.cs
- DbExpressionRules.cs
- XmlMembersMapping.cs
- templategroup.cs
- EncoderReplacementFallback.cs
- TraceUtils.cs
- ToolStripItemGlyph.cs
- ProgressBar.cs
- SqlParameterizer.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- SortDescriptionCollection.cs
- TextParagraphCache.cs
- TemplateBindingExpressionConverter.cs
- BStrWrapper.cs
- CheckBoxList.cs
- Timer.cs
- SqlXmlStorage.cs
- SmtpNtlmAuthenticationModule.cs
- PointKeyFrameCollection.cs
- SQLInt16.cs
- CharEnumerator.cs
- ToolStripScrollButton.cs
- PropertyOrder.cs
- ReadOnlyPropertyMetadata.cs
- ExpressionWriter.cs
- PersonalizablePropertyEntry.cs
- SizeConverter.cs
- BlockUIContainer.cs
- TextBoxAutomationPeer.cs
- Stroke2.cs
- StyleSheetRefUrlEditor.cs
- ColorConvertedBitmap.cs
- PolicyUnit.cs
- AppDomainShutdownMonitor.cs
- LinkClickEvent.cs
- BrowserCapabilitiesFactory35.cs
- SegmentInfo.cs
- AnimationTimeline.cs
- SynchronizationScope.cs
- CharStorage.cs