Fixes build
[mono.git] / mcs / class / System / System.Net.Configuration / AuthenticationModuleElement.cs
old mode 100755 (executable)
new mode 100644 (file)
index a0ab8bb..62413a1
@@ -3,9 +3,10 @@
 //
 // Authors:
 //     Tim Coleman (tim@timcoleman.com)
+//     Chris Toshok (toshok@ximian.com)
 //
 // Copyright (C) Tim Coleman, 2004
-// (c) 2004 Novell, Inc. (http://www.novell.com)
+// (C) 2004,2005 Novell, Inc. (http://www.novell.com)
 //
 
 //
@@ -29,7 +30,7 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-#if NET_2_0 && XML_DEP
+#if NET_2_0 && CONFIGURATION_DEP
 
 using System.Configuration;
 
@@ -39,21 +40,26 @@ namespace System.Net.Configuration
        {
                #region Fields
 
-               ConfigurationPropertyCollection properties;
-               static ConfigurationProperty type = new ConfigurationProperty ("Type", typeof (string), null);
+               static ConfigurationPropertyCollection properties;
+               static ConfigurationProperty typeProp;
 
                #endregion // Fields
 
                #region Constructors
 
-               public AuthenticationModuleElement ()
+               static AuthenticationModuleElement ()
                {
+                       typeProp = new ConfigurationProperty ("type", typeof (string), null, ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey);
                        properties = new ConfigurationPropertyCollection ();
-                       properties.Add (type);
+
+                       properties.Add (typeProp);
+               }
+
+               public AuthenticationModuleElement ()
+               {
                }
 
                public AuthenticationModuleElement (string typeName)
-                       : this ()
                {
                        Type = typeName;
                }
@@ -62,13 +68,14 @@ namespace System.Net.Configuration
 
                #region Properties
 
-               protected internal override ConfigurationPropertyCollection Properties {
+               protected override ConfigurationPropertyCollection Properties {
                        get { return properties; }
                }
 
+               [ConfigurationProperty ("type", Options = ConfigurationPropertyOptions.IsRequired | ConfigurationPropertyOptions.IsKey)]
                public string Type {
-                       get { return (string) base [type]; }
-                       set { base [type] = value; }
+                       get { return (string) base [typeProp]; }
+                       set { base [typeProp] = value; }
                }
 
                #endregion // Properties