API Reference
RegistryControl
A registry-backed control that evaluates a single value at a given key/path and supports optional remediation.
Inheritance
- Object
- RegistryControl
Constructors
public RegistryControl(String id, String title, String keyPath, String valueName, RegistryValueKind kind, CxValueKind valueKind, CxComparator comparator) #Creates a new RegistryControl for the specified path/value.
Parameters
- id System.String
- title System.String
- keyPath System.String
- valueName System.String
- kind Microsoft.Win32.RegistryValueKind
- valueKind ComputerX.Controls.CxValueKind
- comparator ComputerX.Controls.CxComparator
Methods
public virtual CxEval Evaluate(String host, CxFacts facts) #CxEvalParameters
- host System.String
- facts ComputerX.Controls.CxFacts
public virtual String GetAnchor() #StringReturns the specific registry anchor including scope when available. Format: REG|Hive\\Path|ValueName|Scope where Scope may be null/empty.
public virtual String GetUnifiedAnchor() #StringReturns the canonical unified anchor for this registry value. Format: U|REG|Hive\\Path|ValueName (no scope component).
public virtual Boolean IsApplicable(CxFacts facts) #BooleanParameters
- facts ComputerX.Controls.CxFacts
public virtual Object ReadCurrent(String host, CxFacts facts) #ObjectParameters
- host System.String
- facts ComputerX.Controls.CxFacts
public virtual Boolean TryWrite(String host, Object value, out String error) #BooleanParameters
- host System.String
- value System.Object
- error System.String@
public RegistryControl WhereIs(CxCondition c) #RegistryControlSets an applicability predicate.
Parameters
- c ComputerX.Controls.CxCondition
public RegistryControl WithDesired(CxVendor vendor, Object value, String ruleId = null, String note = null, String description = null, String referenceUrl = null, String severity = null, String category = null, String[] tags = null) #RegistryControlAdds a vendor desired value with optional metadata.
Parameters
- vendor ComputerX.Controls.CxVendor
- value System.Object
- ruleId System.String = null
- note System.String = null
- description System.String = null
- referenceUrl System.String = null
- severity System.String = null
- category System.String = null
- tags System.String[] = null
Inherited Methods
public override Boolean Equals(Object obj) #BooleanParameters
- obj Object
Properties
public static Func<String, String, String, Object> TestReadOverride { get; set; } #Optional testing hook: when set, ReadCurrent will delegate to this provider instead of reading the registry. Do not set in production code. Intended for unit tests in environments where HKCU writes are unreliable.
public virtual String Id { get; } #public virtual String Title { get; } #public virtual CxValueKind ValueKind { get; } #public virtual CxComparator Comparator { get; } #public String KeyPath { get; } #Absolute registry key path (HKLM/HKU supported).
public String ValueName { get; } #Registry value name (empty or null refers to the default value).
public RegistryValueKind RegistryKind { get; } #Registry value kind used for writing.
public CxCondition Where { get; set; } #Optional applicability predicate.
public virtual IReadOnlyList<CxDesired> Desired { get; } #