API Reference
PresentationResolver
Utilities for mapping ADMX policy element ids to human‑readable labels and values using ADML presentations.
Inheritance
- Object
- PresentationResolver
Methods
public static IReadOnlyDictionary<String, String> BuildElementLabelMap(AdmxDocument doc, PolicyDefinition policy) #IReadOnlyDictionary<String, String>Builds a best‑effort map of element id → friendly label for a given policy using loaded ADML presentations. Strategy: - Prefer the policy-bound presentation (ADMX presentation attribute) when available; otherwise fall back to presentation id == policy name. - Scan selected presentations and capture associations where a control (checkBox, textBox, etc.) has a matching refId. - Use the most recent preceding <text> element in the same presentation as the label for that control. - Fall back to stringTable[refId] when available, else to the raw refId.
Parameters
- doc ADPlayground.Gpo.GpoLocal.AdmxDocument
- policy ADPlayground.Gpo.GpoLocal.PolicyDefinition
public static IReadOnlyDictionary<String, String> BuildElementValueDisplay(AdmxDocument doc, PolicyDefinition policy, IReadOnlyDictionary<String, Object> states) #IReadOnlyDictionary<String, String>Converts typed element values (PolicyProcessing.GetElementStates) into user‑friendly text using ADMX metadata. - enum → selected option display text - boolean → True/False - lists → joined summaries (comma‑separated or key=value pairs) - numbers/text → ToString() invariant
Parameters
- doc ADPlayground.Gpo.GpoLocal.AdmxDocument
- policy ADPlayground.Gpo.GpoLocal.PolicyDefinition
- states System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object}
public static String ResolveTextTokens(AdmxDocument doc, String text) #StringResolves $(string.X) tokens using the loaded ADML stringTable, if available.
Parameters
- doc ADPlayground.Gpo.GpoLocal.AdmxDocument
- Compiled ADMX/ADML document.
- text System.String
- Text that may contain ADML string tokens.
Returns
Resolved text when possible; otherwise returns the original input.