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
}
}
public static readonly RegistryKey Users = new RegistryKey (
RegistryHive.Users);
+#if NET_2_0
static RegistryKey ToKey (string keyName, bool setting)
{
if (keyName == null)
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)
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)
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)
return key.GetValue (valueName, defaultValue);
}
+#endif
}
}
#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 ();
RegistryApi.SetValue (this, name, value, valueKind);
}
+#endif
/// <summary>
/// Open the sub key specified, for read access.
#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.
}
#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){
}
throw new ArgumentException ("Value could not be converted to specified type", "valueKind");
}
+#endif
void SetDirty ()
{
}
#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)
{
}
#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;
GenerateException (result);
}
}
+#endif
public void SetValue (RegistryKey rkey, string name, object value)
{