C# Class Microsoft.Win32.RegistryKey

Inheritance: System.MarshalByRefObject, IDisposable
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Private Properties

Свойство Type Description
ClosePerfDataKey void
CreateSubKeyInternalCore RegistryKey
DeleteSubKeyCore void
DeleteSubKeyTreeCore void
DeleteValueCore void
FlushCore void
FromHandle Microsoft.Win32.RegistryKey
FromHandle Microsoft.Win32.RegistryKey
GetValueKindCore RegistryValueKind
GetValueNamesCore string[]
InternalGetSubKeyNamesCore string[]
InternalGetValueCore object
InternalOpenSubKeyCore RegistryKey
InternalSubKeyCountCore int
InternalValueCountCore int
IsWritable bool
OpenBaseKeyCore RegistryKey
OpenRemoteBaseKeyCore RegistryKey
RegistryKey
SetValueCore void
Win32Error void
Win32ErrorStatic void

Méthodes publiques

Méthode Description
CreateSubKey ( string subkey ) : Microsoft.Win32.RegistryKey
CreateSubKey ( string subkey, bool writable ) : Microsoft.Win32.RegistryKey
CreateSubKey ( string subkey, bool writable, Microsoft options ) : Microsoft.Win32.RegistryKey
DeleteSubKey ( string subkey ) : void
DeleteSubKey ( string subkey, bool throwOnMissingSubKey ) : void
DeleteSubKeyTree ( string subkey ) : void
DeleteSubKeyTree ( string subkey, bool throwOnMissingSubKey ) : void
DeleteValue ( string name ) : void
DeleteValue ( string name, bool throwOnMissingValue ) : void
Dispose ( ) : void
Flush ( ) : void
GetSubKeyNames ( ) : string[]
GetValue ( string name ) : object
GetValue ( string name, object defaultValue ) : object
GetValue ( string name, object defaultValue, Microsoft options ) : object
GetValueKind ( string name ) : Microsoft.Win32.RegistryValueKind
GetValueNames ( ) : string[]
OpenBaseKey ( Microsoft hKey, Microsoft view ) : Microsoft.Win32.RegistryKey
OpenSubKey ( string name ) : Microsoft.Win32.RegistryKey
OpenSubKey ( string name, System rights ) : Microsoft.Win32.RegistryKey
OpenSubKey ( string name, bool writable ) : Microsoft.Win32.RegistryKey
SetValue ( string name, object value ) : void
SetValue ( string name, object value, Microsoft valueKind ) : void
ToString ( ) : string

Private Methods

Méthode Description
ClosePerfDataKey ( ) : void
CreateSubKeyInternalCore ( string subkey, bool writable, RegistryOptions registryOptions ) : RegistryKey
DeleteSubKeyCore ( string subkey, bool throwOnMissingSubKey ) : void
DeleteSubKeyTreeCore ( string subkey ) : void
DeleteValueCore ( string name, bool throwOnMissingValue ) : void
FlushCore ( ) : void
FromHandle ( Microsoft handle ) : Microsoft.Win32.RegistryKey
FromHandle ( Microsoft handle, Microsoft view ) : Microsoft.Win32.RegistryKey
GetValueKindCore ( string name ) : RegistryValueKind
GetValueNamesCore ( int values ) : string[]

Retrieves an array of strings containing all the value names.

InternalGetSubKeyNamesCore ( int subkeys ) : string[]
InternalGetValueCore ( string name, object defaultValue, bool doNotExpand ) : object
InternalOpenSubKeyCore ( string name, RegistryRights rights, bool throwOnPermissionFailure ) : RegistryKey
InternalSubKeyCountCore ( ) : int
InternalValueCountCore ( ) : int
IsWritable ( int rights ) : bool
OpenBaseKeyCore ( RegistryHive hKeyHive, RegistryView view ) : RegistryKey

Retrieves a new RegistryKey that represents the requested key. Valid values are: HKEY_CLASSES_ROOT, HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, HKEY_USERS, HKEY_PERFORMANCE_DATA, HKEY_CURRENT_CONFIG.

OpenRemoteBaseKeyCore ( RegistryHive hKey, string machineName, RegistryView view ) : RegistryKey
RegistryKey ( )
SetValueCore ( string name, object value, RegistryValueKind valueKind ) : void
Win32Error ( int errorCode, string str ) : void

After calling GetLastWin32Error(), it clears the last error field, so you must save the HResult and pass it to this method. This method will determine the appropriate exception to throw dependent on your error, and depending on the error, insert a string into the message gotten from the ResourceManager.

Win32ErrorStatic ( int errorCode, string str ) : void

Method Details

CreateSubKey() public méthode

public CreateSubKey ( string subkey ) : Microsoft.Win32.RegistryKey
subkey string
Résultat Microsoft.Win32.RegistryKey

CreateSubKey() public méthode

public CreateSubKey ( string subkey, bool writable ) : Microsoft.Win32.RegistryKey
subkey string
writable bool
Résultat Microsoft.Win32.RegistryKey

CreateSubKey() public méthode

public CreateSubKey ( string subkey, bool writable, Microsoft options ) : Microsoft.Win32.RegistryKey
subkey string
writable bool
options Microsoft
Résultat Microsoft.Win32.RegistryKey

DeleteSubKey() public méthode

public DeleteSubKey ( string subkey ) : void
subkey string
Résultat void

DeleteSubKey() public méthode

public DeleteSubKey ( string subkey, bool throwOnMissingSubKey ) : void
subkey string
throwOnMissingSubKey bool
Résultat void

DeleteSubKeyTree() public méthode

public DeleteSubKeyTree ( string subkey ) : void
subkey string
Résultat void

DeleteSubKeyTree() public méthode

public DeleteSubKeyTree ( string subkey, bool throwOnMissingSubKey ) : void
subkey string
throwOnMissingSubKey bool
Résultat void

DeleteValue() public méthode

public DeleteValue ( string name ) : void
name string
Résultat void

DeleteValue() public méthode

public DeleteValue ( string name, bool throwOnMissingValue ) : void
name string
throwOnMissingValue bool
Résultat void

Dispose() public méthode

public Dispose ( ) : void
Résultat void

Flush() public méthode

public Flush ( ) : void
Résultat void

GetSubKeyNames() public méthode

public GetSubKeyNames ( ) : string[]
Résultat string[]

GetValue() public méthode

public GetValue ( string name ) : object
name string
Résultat object

GetValue() public méthode

public GetValue ( string name, object defaultValue ) : object
name string
defaultValue object
Résultat object

GetValue() public méthode

public GetValue ( string name, object defaultValue, Microsoft options ) : object
name string
defaultValue object
options Microsoft
Résultat object

GetValueKind() public méthode

public GetValueKind ( string name ) : Microsoft.Win32.RegistryValueKind
name string
Résultat Microsoft.Win32.RegistryValueKind

GetValueNames() public méthode

public GetValueNames ( ) : string[]
Résultat string[]

OpenBaseKey() public static méthode

public static OpenBaseKey ( Microsoft hKey, Microsoft view ) : Microsoft.Win32.RegistryKey
hKey Microsoft
view Microsoft
Résultat Microsoft.Win32.RegistryKey

OpenSubKey() public méthode

public OpenSubKey ( string name ) : Microsoft.Win32.RegistryKey
name string
Résultat Microsoft.Win32.RegistryKey

OpenSubKey() public méthode

public OpenSubKey ( string name, System rights ) : Microsoft.Win32.RegistryKey
name string
rights System
Résultat Microsoft.Win32.RegistryKey

OpenSubKey() public méthode

public OpenSubKey ( string name, bool writable ) : Microsoft.Win32.RegistryKey
name string
writable bool
Résultat Microsoft.Win32.RegistryKey

SetValue() public méthode

public SetValue ( string name, object value ) : void
name string
value object
Résultat void

SetValue() public méthode

public SetValue ( string name, object value, Microsoft valueKind ) : void
name string
value object
valueKind Microsoft
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string