API Reference
Class
CmtxPolicyIdFile
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:
CmtxPolicyIdFileCreates an instance from an existing set of comment pairs.
Parameters
- comments System.Collections.Generic.IEnumerable{System.Collections.Generic.KeyValuePair{System.String,System.String}}
- Sequence of policyRef → comment text pairs.
public String GetComment(String policyRef) #Returns:
StringReturns a comment associated with a policy reference.
Parameters
- policyRef System.String
- Policy reference (e.g., namespace/policyName).
Returns
Comment text or null if not present.
public static CmtxPolicyIdFile Load(String path) #Returns:
CmtxPolicyIdFileLoads a PolicyPlus-style CMTX comments file from disk.
Parameters
- path System.String
- Path to the .cmtx file.
Returns
Parsed instance with comments.
public Void Save(String path) #Returns:
VoidSaves the comments to a PolicyPlus-style .cmtx file.
Parameters
- path System.String
- Destination file path.
public Void SetComment(String policyRef, String text) #Returns:
VoidSets or replaces a comment for a given policy reference.
Parameters
- policyRef System.String
- Policy reference (e.g., namespace/policyName).
- text System.String
- Comment text.
Inherited Methods
Properties
public IEnumerable<KeyValuePair<String, String>> Comments { get; } #Enumerates policyRef → comment text pairs contained in the file.