API Reference
Class
CmtxFile
Represents a comment table stored in a .cmtx file.
Inheritance
- Object
- CmtxFile
Usage
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by
- Method CmtxFile.FromDictionary
- Method CmtxFile.Load
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
public override Boolean Equals(Object obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object
Properties
public IEnumerable<KeyValuePair<ValueTuple<String, String>, String>> Comments { get; } #Gets the comment entries.