public void SetValue (string name, object value) { AssertNotMarkedForDeletion (); if (name == null) name = string.Empty; // immediately convert non-native registry values to string to avoid // returning it unmodified in calls to UnixRegistryApi.GetValue if (value is int || value is string || value is byte[] || value is string[]) values[name] = value; else values[name] = value.ToString (); SetDirty (); }
public void SetValue(RegistryKey rkey, string name, object value, RegistryValueKind valueKind) { KeyHandler keyHandler = KeyHandler.Lookup(rkey, true); if (keyHandler == null) { throw RegistryKey.CreateMarkedForDeletionException(); } keyHandler.SetValue(name, value, valueKind); }