Fix null sessions in HttpContextWrapper.Session
[mono.git] / mcs / class / corlib / Microsoft.Win32 / Registry.cs
index 03251dad4ea66f932f0de51244badcff8aee84a7..9f97342a0ab5f8026de627a6bcfd3ed93bda2785 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+#if !NET_2_1
+
 using System;
+using System.Runtime.InteropServices;
 
 namespace Microsoft.Win32
 {
-       public
-#if NET_2_0
-       static
-#else
-       sealed
-#endif
-       class Registry
+       [ComVisible (true)]
+       public static class Registry
        {
-#if !NET_2_0
-               private Registry () { }
-#endif
                public static readonly RegistryKey ClassesRoot = new RegistryKey (
                                RegistryHive.ClassesRoot);
                public static readonly RegistryKey CurrentConfig = new RegistryKey (
                                RegistryHive.CurrentConfig);
                public static readonly RegistryKey CurrentUser = new RegistryKey (
                                RegistryHive.CurrentUser);
+
+#if NET_4_0
+               [Obsolete ("Use PerformanceData instead")]
+#endif
                public static readonly RegistryKey DynData = new RegistryKey (
                                RegistryHive.DynData);
                public static readonly RegistryKey LocalMachine = new RegistryKey (
@@ -59,7 +58,6 @@ 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)
@@ -138,6 +136,8 @@ namespace Microsoft.Win32
                        
                        return key.GetValue (valueName, defaultValue);
                }
-#endif
        }
 }
+
+#endif // NET_2_1
+