C# Class Goedel.Mesh.ConfigRegistry

Convenience class for reading and writing windows registry values to an XML file.
显示文件 Open project: hallambaker/Mathematical-Mesh

Public Properties

Property Type Description
Dictionary ConfigRegistryEntry>.SortedDictionary

Public Methods

Method Description
ConfigRegistry ( string Name ) : System

Construct a new instance.

ConfigRegistry ( string Name, string FileName ) : System

Construct a new instance.

Get ( string Key ) : ConfigRegistryEntry

Lookup the key value and return the corresponding ConfigRegistryEntry.

GetBINARY ( string Key ) : byte[]

Lookup the key value and return the corresponding value.

GetDWORD ( string Key ) : uint

Lookup the key value and return the corresponding value.

GetSZ ( string Key ) : string

Lookup the key value and return the corresponding value.

Read ( XmlReader Reader ) : void

Read the registry from an XML stream.

Read ( string FileName ) : void

Read the registry from an XML file.

Set ( string Key, byte Value ) : bool

Set a key for a BINARY value, creating a new key if necessary.

Set ( string Key, string Value ) : bool

Set a key for a SZ value, creating a new key if necessary.

Set ( string Key, string Type, string Value ) : bool

Set the value of the specified key, creating a new value if necessary from a string.

Set ( string Key, uint Value ) : bool

Set a key for a DWORD value, creating a new key if necessary.

Write ( XmlWriter Writer ) : void

Write the registry to an XML stream.

Write ( string FileName ) : void

Write the registry to an XML file.

Method Details

ConfigRegistry() public method

Construct a new instance.
public ConfigRegistry ( string Name ) : System
Name string The topmost element of the registry.
return System

ConfigRegistry() public method

Construct a new instance.
public ConfigRegistry ( string Name, string FileName ) : System
Name string The topmost element of the registry.
FileName string The file to read
return System

Get() public method

Lookup the key value and return the corresponding ConfigRegistryEntry.
public Get ( string Key ) : ConfigRegistryEntry
Key string The key to lookup.
return ConfigRegistryEntry

GetBINARY() public method

Lookup the key value and return the corresponding value.
public GetBINARY ( string Key ) : byte[]
Key string The key to lookup.
return byte[]

GetDWORD() public method

Lookup the key value and return the corresponding value.
public GetDWORD ( string Key ) : uint
Key string The key to lookup.
return uint

GetSZ() public method

Lookup the key value and return the corresponding value.
public GetSZ ( string Key ) : string
Key string The key to lookup.
return string

Read() public method

Read the registry from an XML stream.
public Read ( XmlReader Reader ) : void
Reader XmlReader The stream to read
return void

Read() public method

Read the registry from an XML file.
public Read ( string FileName ) : void
FileName string The file to read
return void

Set() public method

Set a key for a BINARY value, creating a new key if necessary.
public Set ( string Key, byte Value ) : bool
Key string The key to set.
Value byte The value to set it to.
return bool

Set() public method

Set a key for a SZ value, creating a new key if necessary.
public Set ( string Key, string Value ) : bool
Key string The key to set.
Value string The value to set it to.
return bool

Set() public method

Set the value of the specified key, creating a new value if necessary from a string.
public Set ( string Key, string Type, string Value ) : bool
Key string The key to set.
Type string The type of data to create.
Value string The data value as a string.
return bool

Set() public method

Set a key for a DWORD value, creating a new key if necessary.
public Set ( string Key, uint Value ) : bool
Key string The key to set.
Value uint The value to set it to.
return bool

Write() public method

Write the registry to an XML stream.
public Write ( XmlWriter Writer ) : void
Writer System.Xml.XmlWriter The stream to write
return void

Write() public method

Write the registry to an XML file.
public Write ( string FileName ) : void
FileName string The file to write.
return void

Property Details

Dictionary public_oe property

Sorted dictionary mapping registry keys to entries. The original insertion order is preserved unless changed by the calling code (e.g. to sort). Updated elements will remain in their original position.
public SortedDictionary Dictionary
return ConfigRegistryEntry>.SortedDictionary