public CommandSegment(IShellSegment command, IReadOnlyList <IShellSegment> args = null) { Ensure.That(command, nameof(command)).IsNotNull(); this.Command = command; this.Arguments = args; }
public PipeSegment(IShellSegment left, IShellSegment right) { Ensure.That(left, nameof(left)).IsNotNull(); Ensure.That(right, nameof(right)).IsNotNull(); this.Left = left; this.Right = right; }
public RedirectionSegment(IShellSegment segment, IShellSegment device, RedirectionMode mode) { Ensure.That(segment, nameof(segment)).IsNotNull(); Ensure.That(device, nameof(device)).IsNotNull(); this.Left = segment; this.Device = device; this.Mode = mode; }
public SequenceSegment(IShellSegment left, IShellSegment right, bool safe) { Ensure.That(left, nameof(left)).IsNotNull(); Ensure.That(right, nameof(right)).IsNotNull(); this.Safe = safe; this.Left = left; this.Right = right; }
public CommandInterpolationSegment(IShellSegment segment) { Ensure.That(segment, nameof(segment)).IsNotNull(); this.Segment = segment; }
public IShellSegment Parse(ShellParser parser, IShellSegment left, SyntaxToken <ShellTokenKind> token) { var right = parser.Parse(this.Precedence); return(new PipeSegment(left, right)); }