@@ -13,16 +13,11 @@ namespace DotNetOpenAuth.Configuration {
1313 /// this library's settings.
1414 /// </summary>
1515 [ ContractVerification ( true ) ]
16- public class DotNetOpenAuthSection : ConfigurationSection {
16+ public class DotNetOpenAuthSection : ConfigurationSectionGroup {
1717 /// <summary>
1818 /// The name of the section under which this library's settings must be found.
1919 /// </summary>
20- private const string SectionName = "dotNetOpenAuth" ;
21-
22- /// <summary>
23- /// The name of the <messaging> sub-element.
24- /// </summary>
25- private const string MessagingElementName = "messaging" ;
20+ internal const string SectionName = "dotNetOpenAuth" ;
2621
2722 /// <summary>
2823 /// The name of the <openid> sub-element.
@@ -34,22 +29,10 @@ public class DotNetOpenAuthSection : ConfigurationSection {
3429 /// </summary>
3530 private const string OAuthElementName = "oauth" ;
3631
37- /// <summary>
38- /// The name of the <reporting> sub-element.
39- /// </summary>
40- private const string ReportingElementName = "reporting" ;
41-
42- /// <summary>
43- /// The name of the <webResourceUrlProvider> sub-element.
44- /// </summary>
45- private const string WebResourceUrlProviderName = "webResourceUrlProvider" ;
46-
4732 /// <summary>
4833 /// Initializes a new instance of the <see cref="DotNetOpenAuthSection"/> class.
4934 /// </summary>
5035 internal DotNetOpenAuthSection ( ) {
51- Contract . Assume ( this . SectionInformation != null ) ;
52- this . SectionInformation . AllowLocation = false ;
5336 }
5437
5538 /// <summary>
@@ -62,43 +45,17 @@ public static DotNetOpenAuthSection Configuration {
6245 }
6346 }
6447
65- /// <summary>
66- /// Gets or sets the configuration for the messaging framework.
67- /// </summary>
68- [ ConfigurationProperty ( MessagingElementName ) ]
69- public MessagingElement Messaging {
70- get {
71- Contract . Ensures ( Contract . Result < MessagingElement > ( ) != null ) ;
72- return ( MessagingElement ) this [ MessagingElementName ] ?? new MessagingElement ( ) ;
73- }
74-
75- set {
76- this [ MessagingElementName ] = value ;
77- }
48+ public static MessagingElement Messaging {
49+ get { return MessagingElement . Configuration ; }
7850 }
7951
80- /// <summary>
81- /// Gets or sets the configuration for reporting.
82- /// </summary>
83- [ ConfigurationProperty ( ReportingElementName ) ]
84- internal ReportingElement Reporting {
85- get {
86- Contract . Ensures ( Contract . Result < ReportingElement > ( ) != null ) ;
87- return ( ReportingElement ) this [ ReportingElementName ] ?? new ReportingElement ( ) ;
88- }
89-
90- set {
91- this [ ReportingElementName ] = value ;
92- }
52+ internal TypeConfigurationElement < IEmbeddedResourceRetrieval > EmbeddedResourceRetrievalProvider {
53+ get { return /*(TypeConfigurationElement<IEmbeddedResourceRetrieval>)this[WebResourceUrlProviderName] ??*/ new TypeConfigurationElement < IEmbeddedResourceRetrieval > ( ) ; }
54+ set { /*this[WebResourceUrlProviderName] = value;*/ }
9355 }
9456
95- /// <summary>
96- /// Gets or sets the type to use for obtaining URLs that fetch embedded resource streams.
97- /// </summary>
98- [ ConfigurationProperty ( WebResourceUrlProviderName ) ]
99- internal TypeConfigurationElement < IEmbeddedResourceRetrieval > EmbeddedResourceRetrievalProvider {
100- get { return ( TypeConfigurationElement < IEmbeddedResourceRetrieval > ) this [ WebResourceUrlProviderName ] ?? new TypeConfigurationElement < IEmbeddedResourceRetrieval > ( ) ; }
101- set { this [ WebResourceUrlProviderName ] = value ; }
57+ internal static ReportingElement Reporting {
58+ get { return ReportingElement . Configuration ; }
10259 }
10360 }
10461}
0 commit comments