API Reference
Source
Describes how a rule produces data: PowerShell script, C# method, and associated metadata.
Inheritance
- Object
- Source
Constructors
public Source() #Methods
ConvertParameter(System.Object arg1, System.Type arg2) #Converts parameter values to the expected types
Parameters
- arg1 System.Object
- arg2 System.Type
CreateDelegateWrapper(System.Delegate arg1) #Creates wrapper for Delegate objects (existing functionality)
Parameters
- arg1 System.Delegate
CreateMethodInfoWrapper(System.Reflection.MethodInfo arg1) #Creates wrapper for MethodInfo with automatic instance creation and parameter mapping 🚀 This eliminates the need for static wrapper methods across all external libraries!
Parameters
- arg1 System.Reflection.MethodInfo
CreateMethodWrapper(System.Object arg1) #Creates a wrapper around any method that returns Task<IEnumerable<T>> or IEnumerable<T> Supports both Delegate and MethodInfo with automatic instance creation and parameter mapping
Parameters
- arg1 System.Object
public Func<IDictionary<String, Object>, Task<IEnumerable<Object>>> GetEffectiveMethod() #Func<IDictionary<String, Object>, Task<IEnumerable<Object>>>Gets the effective method to execute, handling both legacy Method and new DirectMethod
Inherited Methods
Properties
public ScriptBlock Data { get; set; } #PowerShell script used to gather data (for PowerShell‑backed rules).
public Func<IDictionary<String, Object>, Task<IEnumerable<Object>>> Method { get; set; } #Legacy C# method callback with dictionary parameters.
public Object DirectMethod { get; set; } #Direct method reference (Delegate or MethodInfo) returning IEnumerable<T> or Task<IEnumerable<T>>.
public RuleSourceType SourceType { get; set; } #Indicates whether this source is PowerShell or C# backed.
public SourceDetails Details { get; set; } #Descriptive metadata for reports and selection.
public Nullable<Boolean> ExpectedOutput { get; set; } #When set, asserts whether any output should be produced.
public RequirementSet Requirements { get; set; } #Optional requirements that must be satisfied before executing the source.
public List<PSObject> Results { get; set; } #Captured PowerShell results (if applicable).
public ScriptBlock WhereObject { get; set; } #Optional PowerShell Where-Object filter applied to results.
public Dictionary<String, Object> Parameters { get; set; } #Default parameters for the rule that can be overridden by configuration