//----------------------------------------------------------------------- // // Copyright (c) Andrew Arnott. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Configuration { using System.Configuration; using System.Diagnostics.Contracts; /// /// Represents the section in the host's .config file that configures /// this library's settings. /// [ContractVerification(true)] public class DotNetOpenAuthSection : ConfigurationSectionGroup { /// /// The name of the section under which this library's settings must be found. /// internal const string SectionName = "dotNetOpenAuth"; /// /// The name of the <openid> sub-element. /// private const string OpenIdElementName = "openid"; /// /// The name of the <oauth> sub-element. /// private const string OAuthElementName = "oauth"; /// /// Initializes a new instance of the class. /// internal DotNetOpenAuthSection() { } /// /// Gets the configuration section from the .config file. /// public static DotNetOpenAuthSection Configuration { get { Contract.Ensures(Contract.Result() != null); return (DotNetOpenAuthSection)ConfigurationManager.GetSection(SectionName) ?? new DotNetOpenAuthSection(); } } public static MessagingElement Messaging { get { return MessagingElement.Configuration; } } internal TypeConfigurationElement EmbeddedResourceRetrievalProvider { get { return /*(TypeConfigurationElement)this[WebResourceUrlProviderName] ??*/ new TypeConfigurationElement(); } set { /*this[WebResourceUrlProviderName] = value;*/ } } internal static ReportingElement Reporting { get { return ReportingElement.Configuration; } } } }