//----------------------------------------------------------------------- // // Copyright (c) Andrew Arnott. All rights reserved. // //----------------------------------------------------------------------- namespace DotNetOpenAuth.Configuration { using System.Configuration; using System.Diagnostics.Contracts; using DotNetOpenAuth.OpenId.Provider; /// /// The section in the .config file that allows customization of OpenID Provider behaviors. /// [ContractVerification(true)] internal class OpenIdProviderElement : ConfigurationElement { /// /// The name of the security sub-element. /// private const string SecuritySettingsConfigName = "security"; /// /// The name of the custom store sub-element. /// private const string StoreConfigName = "store"; /// /// Initializes a new instance of the class. /// public OpenIdProviderElement() { } /// /// Gets or sets the security settings. /// [ConfigurationProperty(SecuritySettingsConfigName)] public ProviderSecuritySettingsElement SecuritySettings { get { return (ProviderSecuritySettingsElement)this[SecuritySettingsConfigName] ?? new ProviderSecuritySettingsElement(); } set { this[SecuritySettingsConfigName] = value; } } /// /// Gets or sets the type to use for storing application state. /// [ConfigurationProperty(StoreConfigName)] public TypeConfigurationElement ApplicationStore { get { return (TypeConfigurationElement)this[StoreConfigName] ?? new TypeConfigurationElement(); } set { this[StoreConfigName] = value; } } } }