summaryrefslogtreecommitdiffstats
path: root/src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs
diff options
context:
space:
mode:
authorAndrew Arnott <andrewarnott@gmail.com>2011-07-02 20:04:57 -0700
committerAndrew Arnott <andrewarnott@gmail.com>2011-07-02 20:04:57 -0700
commitac7b3b8bd58a220bb1d9e310456e75f601b99b58 (patch)
treea232dca840de2c5175f576dc612a31b77bf9ea80 /src/DotNetOpenAuth.OpenId/Configuration/OpenIdElement.cs
parent4faaa016aeccd6aa78a4095021fe67328a57c9fe (diff)
downloadDotNetOpenAuth-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.cs17
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 &lt;openid&gt; 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 &lt;relyingParty&gt; 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>