Revert accidental WIP commit, ugh
authorMarek Habersack <grendel@twistedcode.net>
Tue, 6 Mar 2007 20:47:40 +0000 (20:47 -0000)
committerMarek Habersack <grendel@twistedcode.net>
Tue, 6 Mar 2007 20:47:40 +0000 (20:47 -0000)
svn path=/trunk/mcs/; revision=73844

mcs/class/corlib/Microsoft.Win32/IRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Registry.cs
mcs/class/corlib/Microsoft.Win32/RegistryKey.cs
mcs/class/corlib/Microsoft.Win32/UnixRegistryApi.cs
mcs/class/corlib/Microsoft.Win32/Win32RegistryApi.cs

index c7c8dd532082ff87cfd3c899ead66d9038d41242..af6648b69b9453c2e0b9b105f1c5e674f58e7b3a 100644 (file)
@@ -54,8 +54,10 @@ namespace Microsoft.Win32 {
                string [] GetSubKeyNames (RegistryKey rkey);
                string [] GetValueNames (RegistryKey rkey);
                string ToString (RegistryKey rkey);
-               
+
+#if NET_2_0
                void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind);
+#endif
        }
 }
 
index db7ebf0976428d4fb2a5b566431a09c7ee04f98a..03251dad4ea66f932f0de51244badcff8aee84a7 100644 (file)
@@ -59,6 +59,7 @@ namespace Microsoft.Win32
                public static readonly RegistryKey Users = new RegistryKey (
                                RegistryHive.Users);
 
+#if NET_2_0
                static RegistryKey ToKey (string keyName, bool setting)
                {
                        if (keyName == null)
@@ -105,12 +106,7 @@ namespace Microsoft.Win32
                        return key;
                }
                
-#if NET_2_0
-               public
-#else
-               internal 
-#endif
-               static void SetValue (string keyName, string valueName, object value)
+               public static void SetValue (string keyName, string valueName, object value)
                {
                        RegistryKey key = ToKey (keyName, true);
                        if (valueName.Length > 255)
@@ -122,12 +118,7 @@ namespace Microsoft.Win32
                        key.SetValue (valueName, value);
                }
 
-#if NET_2_0
-               public
-#else
-               internal 
-#endif
-               static void SetValue (string keyName, string valueName, object value, RegistryValueKind valueKind)
+               public static void SetValue (string keyName, string valueName, object value, RegistryValueKind valueKind)
                {
                        RegistryKey key = ToKey (keyName, true);
                        if (valueName.Length > 255)
@@ -139,12 +130,7 @@ namespace Microsoft.Win32
                        key.SetValue (valueName, value, valueKind);
                }
                
-#if NET_2_0
-               public
-#else
-               internal 
-#endif
-               static object GetValue (string keyName, string valueName, object defaultValue)
+               public static object GetValue (string keyName, string valueName, object defaultValue)
                {
                        RegistryKey key = ToKey (keyName, false);
                        if (key == null)
@@ -152,5 +138,6 @@ namespace Microsoft.Win32
                        
                        return key.GetValue (valueName, defaultValue);
                }
+#endif
        }
 }
index 63e5f750b564255bf084301d2ad75e1c2f483248..99d2b4a72312804431c9789640a4546f88e30eb9 100644 (file)
@@ -195,11 +195,7 @@ namespace Microsoft.Win32
 
 #if NET_2_0
                [ComVisible (false)]
-               public 
-#else
-               internal
-#endif
-               void SetValue (string name, object value, RegistryValueKind valueKind)
+               public void SetValue (string name, object value, RegistryValueKind valueKind)
                {
                        AssertKeyStillValid ();
                        
@@ -211,6 +207,7 @@ namespace Microsoft.Win32
 
                        RegistryApi.SetValue (this, name, value, valueKind);
                }
+#endif
 
                /// <summary>
                ///     Open the sub key specified, for read access.
@@ -255,16 +252,13 @@ namespace Microsoft.Win32
 
 #if NET_2_0
                [ComVisible (false)]
-               public 
-#else
-               internal
-#endif
-               object GetValue (string name, object defaultValue, RegistryValueOptions options)
+               public object GetValue (string name, object defaultValue, RegistryValueOptions options)
                {
                        AssertKeyStillValid ();
 
                        return RegistryApi.GetValue (this, name, defaultValue, options);
                }
+#endif
 
                /// <summary>
                ///     Create a sub key.
index 29cdad790d0c03eeec76531da072d712defe7eff..aa9eadafa7ded9764f450176c4386895a450a520 100644 (file)
@@ -351,14 +351,10 @@ namespace Microsoft.Win32 {
                }
 
 #if NET_2_0
-               public
-#else
-               internal
-#endif
                //
                // This version has to do argument validation based on the valueKind
                //
-               void SetValue (string name, object value, RegistryValueKind valueKind)
+               public void SetValue (string name, object value, RegistryValueKind valueKind)
                {
                        SetDirty ();
                        switch (valueKind){
@@ -417,6 +413,7 @@ namespace Microsoft.Win32 {
                        }
                        throw new ArgumentException ("Value could not be converted to specified type", "valueKind");
                }
+#endif
 
                void SetDirty ()
                {
@@ -636,17 +633,14 @@ namespace Microsoft.Win32 {
                }
 
 #if NET_2_0
-               public 
-#else
-               internal
-#endif
-               void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind)
+               public void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind)
                {
                        KeyHandler self = KeyHandler.Lookup (rkey, true);
                        if (self == null)
                                throw RegistryKey.CreateMarkedForDeletionException ();
                        self.SetValue (name, value, valueKind);
                }
+#endif
 
                public int SubKeyCount (RegistryKey rkey)
                {
index 9ddb191ca8606f19b171e50a880ae8f4dc0ec57c..1849a46f4e1e4a2c6d5fc81d6a5e6488e203f346 100644 (file)
@@ -198,15 +198,11 @@ namespace Microsoft.Win32
                }
 
 #if NET_2_0
-               public 
-#else
-               internal
-#endif
                //
                // This version has to do extra checking, make sure that the requested
                // valueKind matches the type of the value being stored
                //
-               void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind)
+               public void SetValue (RegistryKey rkey, string name, object value, RegistryValueKind valueKind)
                {
                        Type type = value.GetType ();
                        int result;
@@ -249,6 +245,7 @@ namespace Microsoft.Win32
                                GenerateException (result);
                        }
                }
+#endif
        
                public void SetValue (RegistryKey rkey, string name, object value)
                {