TestimoX

API Reference

Class

CmtxPolicyIdFile

Namespace ADPlayground.Gpo.GpoLocal
Assembly ADPlayground
Modifiers sealed

Minimal reader/writer for PolicyPlus-style per-policy comments (.cmtx) keyed by policyRef. Stores as <policyComments><comments><comment policyRef=... commentText=... /></comments></policyComments>.

Inheritance

  • Object
  • CmtxPolicyIdFile

Methods

public static CmtxPolicyIdFile FromDictionary(IEnumerable<KeyValuePair<String, String>> comments) #
Returns: CmtxPolicyIdFile

Creates an instance from an existing set of comment pairs.

Parameters

comments System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}} requiredposition: 0
Sequence of policyRef → comment text pairs.
public String GetComment(String policyRef) #
Returns: String

Returns a comment associated with a policy reference.

Parameters

policyRef System.String requiredposition: 0
Policy reference (e.g., namespace/policyName).

Returns

Comment text or null if not present.

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

Loads a PolicyPlus-style CMTX comments file from disk.

Parameters

path System.String requiredposition: 0
Path to the .cmtx file.

Returns

Parsed instance with comments.

public Void Save(String path) #
Returns: Void

Saves the comments to a PolicyPlus-style .cmtx file.

Parameters

path System.String requiredposition: 0
Destination file path.
public Void SetComment(String policyRef, String text) #
Returns: Void

Sets or replaces a comment for a given policy reference.

Parameters

policyRef System.String requiredposition: 0
Policy reference (e.g., namespace/policyName).
text System.String requiredposition: 1
Comment text.

Properties

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

Enumerates policyRef → comment text pairs contained in the file.