diff options
author | Andrew Arnott <andrewarnott@gmail.com> | 2011-07-02 20:04:57 -0700 |
---|---|---|
committer | Andrew Arnott <andrewarnott@gmail.com> | 2011-07-02 20:04:57 -0700 |
commit | ac7b3b8bd58a220bb1d9e310456e75f601b99b58 (patch) | |
tree | a232dca840de2c5175f576dc612a31b77bf9ea80 /src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs | |
parent | 4faaa016aeccd6aa78a4095021fe67328a57c9fe (diff) | |
download | DotNetOpenAuth-ac7b3b8bd58a220bb1d9e310456e75f601b99b58.zip DotNetOpenAuth-ac7b3b8bd58a220bb1d9e310456e75f601b99b58.tar.gz DotNetOpenAuth-ac7b3b8bd58a220bb1d9e310456e75f601b99b58.tar.bz2 |
OpenID project now builds.
* Many of the resource items (resx, png) are improperly declared in the project file.
Diffstat (limited to 'src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs')
-rw-r--r-- | src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs b/src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs index 69994e6..19606fa 100644 --- a/src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs +++ b/src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs @@ -15,7 +15,12 @@ namespace DotNetOpenAuth.Configuration { /// Represents the <openid> element in the host's .config file. /// </summary> [ContractVerification(true)] - internal class OpenIdElement : ConfigurationElement { + internal class OpenIdElement : ConfigurationSection { + /// <summary> + /// The name of the section under which this library's settings must be found. + /// </summary> + private const string SectionName = "openId"; + /// <summary> /// The name of the <relyingParty> sub-element. /// </summary> @@ -53,6 +58,16 @@ namespace DotNetOpenAuth.Configuration { } /// <summary> + /// Gets the configuration section from the .config file. + /// </summary> + public static OpenIdElement Configuration { + get { + Contract.Ensures(Contract.Result<OpenIdElement>() != null); + return (OpenIdElement)ConfigurationManager.GetSection(SectionName) ?? new OpenIdElement(); + } + } + + /// <summary> /// Gets or sets the maximum time a user can take to complete authentication. /// </summary> /// <remarks> |