API Reference
Class
CmtxFile
Represents a comment table stored in a .cmtx file.
Inheritance
- Object
- CmtxFile
Methods
public static CmtxFile FromDictionary(IEnumerable<KeyValuePair<ValueTuple<String, String>, String>> comments) #Returns:
CmtxFileCreates a comment table from an existing dictionary.
Parameters
- comments System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.ValueTuple{System.String,System.String},System.String}}
- Comment mappings.
Returns
The created table.
public String GetComment(String keyPath, String valueName) #Returns:
StringRetrieves the comment for a registry value.
Parameters
- keyPath System.String
- Registry key path.
- valueName System.String
- Registry value name.
Returns
The comment text or null.
public static CmtxFile Load(String path) #Returns:
CmtxFileLoads a comment table from a .cmtx file.
Parameters
- path System.String
- Path to the file.
Returns
The loaded table.
Exceptions
FileNotFoundException– The file could not be found.XmlException– The file contains invalid XML.
public Void Save(String path) #Returns:
VoidSaves this comment table to a .cmtx file.
Parameters
- path System.String
- Destination path.
Exceptions
IOException– The file could not be written.
public Void SetComment(String keyPath, String valueName, String comment) #Returns:
VoidSets the comment for a registry value.
Parameters
- keyPath System.String
- Registry key path.
- valueName System.String
- Registry value name.
- comment System.String
- Comment text.
Inherited Methods
Properties
public IEnumerable<KeyValuePair<ValueTuple<String, String>, String>> Comments { get; } #Gets the comment entries.