API Reference
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
- Forest DNS/NetBIOS name.
- domain System.String = null
- Domain DNS name.
- domainController System.String = null
- Preferred domain controller.
- additional System.Collections.Generic.Dictionary{System.String,System.Object} = null
- Additional parameter bag.
Methods
public virtual RuleParameters <Clone>$() #RuleParametersBindOptions``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
public static RuleParameters FromDictionary(IDictionary<String, Object> dict) #RuleParametersCreates from a dictionary for compatibility with existing code.
Parameters
- dict System.Collections.Generic.IDictionary{System.String,System.Object}
public T Get<T>(String key, T defaultValue = null) #TType Parameters
- T
Parameters
- key String
- defaultValue T = null
public Boolean GetBool(String key, Boolean defaultValue = false) #BooleanGets a boolean parameter.
Parameters
- key System.String
- defaultValue System.Boolean = false
public Double GetDouble(String key, Double defaultValue = 0) #DoubleGets a double parameter.
Parameters
- key System.String
- defaultValue System.Double = 0
public override Int32 GetHashCode() #Int32public Int32 GetInt(String key, Int32 defaultValue = 0) #Int32Gets an integer parameter.
Parameters
- key System.String
- defaultValue System.Int32 = 0
public String GetString(String key, String defaultValue = null) #StringGets a string parameter.
Parameters
- key System.String
- defaultValue System.String = null
public IEnumerable<String> GetStrings(String key) #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
Get``1(System.String key, ``0 defaultValue) #Gets a typed parameter.
Parameters
- key System.String
- defaultValue ``0
public Boolean Has(String key) #BooleanChecks if a parameter exists.
Parameters
- key System.String
public Dictionary<String, Object> ToDictionary() #Dictionary<String, Object>Converts to a dictionary for compatibility with existing code.
public override String ToString() #Stringpublic RuleParameters With(String key, Object value) #RuleParametersCreates a new RuleParameters with an additional value.
Parameters
- key System.String
- value System.Object
public RuleParameters WithMany(params ValueTuple<String, Object>[] values) #RuleParametersCreates a new RuleParameters with multiple additional values.
Parameters
- values System.ValueTuple{System.String,System.Object}[]
Inherited Methods
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 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.