API Reference
Class
PowerShellRuleParser
Class to parse PowerShell rules read from files or embedded resources (PS1 files)
Inheritance
- Object
- PowerShellRuleParser
Constructors
public PowerShellRuleParser() #Methods
public static Rule ParseRule(String filePath) #Returns:
RuleParse a PowerShell rule file and return a Rule object
Parameters
- filePath System.String
public static async Task<Rule> ParseRuleAsync(String filePath) #Returns:
Task<Rule>Parse a PowerShell rule file and return a Rule object.
Parameters
- filePath System.String
public static Rule ParseRuleFromContent(String scriptContent, String fileName) #Returns:
RuleParse a PowerShell script content and return a Rule object. Uses the PowerShell engine for fidelity; falls back to AST-only parsing when necessary.
Parameters
- scriptContent System.String
- fileName System.String
public static Task<Rule> ParseRuleFromContentAsync(String scriptContent, String fileName) #Returns:
Task<Rule>Parse a PowerShell script content and return a Rule object. Uses the PowerShell engine for fidelity; falls back to AST-only parsing when necessary.
Parameters
- scriptContent System.String
- fileName System.String