TestimoX

API Reference

Class

PresentationResolver

Namespace ADPlayground.Gpo.GpoLocal
Assembly ADPlayground
Modifiers static

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) #
Returns: 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 requiredposition: 0
policy ADPlayground.Gpo.GpoLocal.PolicyDefinition requiredposition: 1
public static IReadOnlyDictionary<String, String> BuildElementValueDisplay(AdmxDocument doc, PolicyDefinition policy, IReadOnlyDictionary<String, Object> states) #
Returns: 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 requiredposition: 0
policy ADPlayground.Gpo.GpoLocal.PolicyDefinition requiredposition: 1
states System.Collections.Generic.IReadOnlyDictionary{System.String,System.Object} requiredposition: 2
public static String ResolveTextTokens(AdmxDocument doc, String text) #
Returns: String

Resolves $(string.X) tokens using the loaded ADML stringTable, if available.

Parameters

doc ADPlayground.Gpo.GpoLocal.AdmxDocument requiredposition: 0
Compiled ADMX/ADML document.
text System.String requiredposition: 1
Text that may contain ADML string tokens.

Returns

Resolved text when possible; otherwise returns the original input.