TestimoX

API Reference

Class

RuleParameters

Namespace TestimoX.Execution
Assembly TestimoX
Implements
IEquatable<RuleParameters>

Provides strongly-typed access to rule parameters with common defaults. Can be used as a record for initialization or as a class for dynamic access.

Inheritance

  • Object
  • RuleParameters

Constructors

public RuleParameters(String forestName = null, String domain = null, String domainController = null, Dictionary<String, Object> additional = null) #

Initializes a new set of rule parameters.

Parameters

forestName System.String = null optionalposition: 0
Forest DNS/NetBIOS name.
domain System.String = null optionalposition: 1
Domain DNS name.
domainController System.String = null optionalposition: 2
Preferred domain controller.
additional System.Collections.Generic.Dictionary{System.String,System.Object} = null optionalposition: 3
Additional parameter bag.

Methods

public virtual RuleParameters <Clone>$() #
Returns: RuleParameters
public T BindOptions<T>(T seed = null) #
Returns: T

Type Parameters

T

Parameters

seed T = null optionalposition: 0
BindOptions``1(``0 seed) #

Binds Additional into a strongly-typed options object by matching property names (case-insensitive). Supports: string, bool, int, double, enums, string[]/IEnumerable<string> (CSV strings accepted). Properties must be public and settable.

Parameters

seed ``0 required
public virtual Boolean Equals(RuleParameters other) #
Returns: Boolean

Parameters

obj Object requiredposition: 0
public static RuleParameters FromDictionary(IDictionary<String, Object> dict) #
Returns: RuleParameters

Creates from a dictionary for compatibility with existing code.

Parameters

dict System.Collections.Generic.IDictionary{System.String,System.Object} requiredposition: 0
public T Get<T>(String key, T defaultValue = null) #
Returns: T

Type Parameters

T

Parameters

key String requiredposition: 0
defaultValue T = null optionalposition: 1
public Boolean GetBool(String key, Boolean defaultValue = false) #
Returns: Boolean

Gets a boolean parameter.

Parameters

key System.String requiredposition: 0
defaultValue System.Boolean = false optionalposition: 1
public Double GetDouble(String key, Double defaultValue = 0) #
Returns: Double

Gets a double parameter.

Parameters

key System.String requiredposition: 0
defaultValue System.Double = 0 optionalposition: 1
public override Int32 GetHashCode() #
Returns: Int32
public Int32 GetInt(String key, Int32 defaultValue = 0) #
Returns: Int32

Gets an integer parameter.

Parameters

key System.String requiredposition: 0
defaultValue System.Int32 = 0 optionalposition: 1
public String GetString(String key, String defaultValue = null) #
Returns: String

Gets a string parameter.

Parameters

key System.String requiredposition: 0
defaultValue System.String = null optionalposition: 1
public IEnumerable<String> GetStrings(String key) #
Returns: IEnumerable<String>

Gets a sequence of strings from a parameter. Accepts string (CSV) or IEnumerable<string>. Returns an empty sequence when the key is missing or invalid.

Parameters

key System.String requiredposition: 0
Get``1(System.String key, ``0 defaultValue) #

Gets a typed parameter.

Parameters

key System.String required
defaultValue ``0 required
public Boolean Has(String key) #
Returns: Boolean

Checks if a parameter exists.

Parameters

key System.String requiredposition: 0
public Dictionary<String, Object> ToDictionary() #
Returns: Dictionary<String, Object>

Converts to a dictionary for compatibility with existing code.

public override String ToString() #
Returns: String
public RuleParameters With(String key, Object value) #
Returns: RuleParameters

Creates a new RuleParameters with an additional value.

Parameters

key System.String requiredposition: 0
value System.Object requiredposition: 1
public RuleParameters WithMany(params ValueTuple<String, Object>[] values) #
Returns: RuleParameters

Creates a new RuleParameters with multiple additional values.

Parameters

values System.ValueTuple{System.String,System.Object}[] requiredposition: 0

Properties

public String ForestName { get; set; } #

Forest name (NetBIOS/LDAP). When only one of ForestName/Domain is provided, the other is normalized to match.

public String Domain { get; set; } #

Domain name (DNS). If only ForestName is supplied, Domain is derived from it.

public String DomainController { get; set; } #

Preferred domain controller host name to target (optional).

public Dictionary<String, Object> Additional { get; set; } #

Arbitrary parameter bag for rule‑specific options (string keys, object values).

public String DomainName { get; } #

Gets the domain name, with fallback to Domain property.

public String Forest { get; } #

Gets the forest name, with fallback to ForestName and finally to the current forest when available. This avoids sprinkling null-forgiveness across rules; when null, callers can rely on current forest.

public String DC { get; } #

Gets the domain controller, with fallback to DomainController property.

public String ComputerName { get; } #

Gets the computer name, defaulting to local machine if not specified.

public String ServerName { get; } #

Gets the server name.

public ActiveDirectoryDataServices ActiveDirectoryData { get; } #

Gets the shared Active Directory discovery snapshot when available.

public ActiveDirectoryOverview ActiveDirectoryOverview { get; } #

Gets the captured Active Directory overview snapshot when available.

public Boolean IncludeDisabled { get; } #

Gets whether to include disabled objects.

public Boolean IncludeDeleted { get; } #

Gets whether to include deleted objects.

public Int32 MaxAgeDays { get; } #

Gets the maximum age in days for various checks.

public Int32 WarningDays { get; } #

Gets the warning threshold in days.

public Int32 CriticalDays { get; } #

Gets the critical threshold in days.

public String DomainDn { get; } #

Distinguished Name of the current domain (computed from Domain if not provided in Additional["DomainDn"]).

public String DomainControllersDn { get; } #

Distinguished Name of the default Domain Controllers OU for the current domain.

public String DefaultUsersDn { get; } #

Distinguished Name of the default Users container.

public String DefaultComputersDn { get; } #

Distinguished Name of the default Computers container.

public String SysvolShare { get; } #

UNC path to the domain SYSVOL share (e.g., \\contoso.com\\SYSVOL).

public String NetlogonShare { get; } #

UNC path to the domain NETLOGON share (e.g., \\contoso.com\\NETLOGON).