TestimoX

API Reference

Class

CmtxFile

Namespace ADPlayground.Gpo.GpoLocal
Assembly ADPlayground
Modifiers sealed

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: CmtxFile

Creates 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}} requiredposition: 0
Comment mappings.

Returns

The created table.

public String GetComment(String keyPath, String valueName) #
Returns: String

Retrieves the comment for a registry value.

Parameters

keyPath System.String requiredposition: 0
Registry key path.
valueName System.String requiredposition: 1
Registry value name.

Returns

The comment text or null.

public static CmtxFile Load(String path) #
Returns: CmtxFile

Loads a comment table from a .cmtx file.

Parameters

path System.String requiredposition: 0
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: Void

Saves this comment table to a .cmtx file.

Parameters

path System.String requiredposition: 0
Destination path.

Exceptions

  • IOException – The file could not be written.
public Void SetComment(String keyPath, String valueName, String comment) #
Returns: Void

Sets the comment for a registry value.

Parameters

keyPath System.String requiredposition: 0
Registry key path.
valueName System.String requiredposition: 1
Registry value name.
comment System.String requiredposition: 2
Comment text.

Properties

public IEnumerable<KeyValuePair<ValueTuple<String, String>, String>> Comments { get; } #

Gets the comment entries.