forked from dotnet/sdk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathICommand.cs
More file actions
33 lines (19 loc) · 915 Bytes
/
ICommand.cs
File metadata and controls
33 lines (19 loc) · 915 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
// Licensed to the .NET Foundation under one or more agreements.
// The .NET Foundation licenses this file to you under the MIT license.
namespace Microsoft.DotNet.Cli.Utils;
public interface ICommand
{
CommandResult Execute();
ICommand WorkingDirectory(string projectDirectory);
ICommand EnvironmentVariable(string name, string? value);
ICommand CaptureStdOut();
ICommand CaptureStdErr();
ICommand ForwardStdOut(TextWriter? to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true);
ICommand ForwardStdErr(TextWriter? to = null, bool onlyIfVerbose = false, bool ansiPassThrough = true);
ICommand OnOutputLine(Action<string> handler);
ICommand OnErrorLine(Action<string> handler);
ICommand SetCommandArgs(string commandArgs);
ICommand StandardOutputEncoding(Encoding encoding);
string CommandName { get; }
string CommandArgs { get; }
}