Table of Contents

Class PowershellParser

Namespace
SunamoPS
Assembly
SunamoPS.dll

Parses PowerShell command strings into individual parts, respecting quoted sections.

public class PowershellParser
Inheritance
PowershellParser
Inherited Members
Extension Methods

Properties

Instance

Singleton instance of PowershellParser.

public static PowershellParser Instance { get; }

Property Value

PowershellParser

Methods

ParseToParts(string, string)

Parses a command string into individual parts. Spaces inside quoted sections are preserved.

public List<string> ParseToParts(string text, string charWhichIsNotContained)

Parameters

text string

Command string to parse.

charWhichIsNotContained string

Temporary placeholder character that must not appear in the input.

Returns

List<string>

List of parsed command parts.