Exemple #1
0
        public CommandSegment(IShellSegment command, IReadOnlyList <IShellSegment> args = null)
        {
            Ensure.That(command, nameof(command)).IsNotNull();

            this.Command   = command;
            this.Arguments = args;
        }
Exemple #2
0
        public PipeSegment(IShellSegment left, IShellSegment right)
        {
            Ensure.That(left, nameof(left)).IsNotNull();
            Ensure.That(right, nameof(right)).IsNotNull();

            this.Left  = left;
            this.Right = right;
        }
Exemple #3
0
        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;
        }
Exemple #4
0
        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;
 }
Exemple #6
0
        public IShellSegment Parse(ShellParser parser, IShellSegment left, SyntaxToken <ShellTokenKind> token)
        {
            var right = parser.Parse(this.Precedence);

            return(new PipeSegment(left, right));
        }