示例#1
0
 protected override void PreExecution(System.Collections.Generic.IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
 {
     SetCommandAndArguments(DownloadCommand, CreateArgument());
 }
示例#2
0
 protected override void PostExecution(System.Collections.Generic.IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
 {
     output.ResetColors();
 }
示例#3
0
        protected override void PreExecution(System.Collections.Generic.IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
        {
            SetCommandAndArguments(PromptCommand, Text);
            var color = ColorNameToConsoleColor(this.Color);

            output.SetForegroundColor(color);
        }
示例#4
0
        protected override void PreExecution(System.Collections.Generic.IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
        {
            if (string.IsNullOrWhiteSpace(Source))
            {
                throw new InvalidOperationException("Cannot use LinkModule without a Source.");
            }
            // Target may be null as the source name will be used instead.

            SetCommandAndArguments(LinkCommand, CreateArgument());
        }
示例#5
0
 protected override void PreExecution(IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
 {
     ThrowIfNoFolderSet();
     SetCommandAndArguments(FolderCommand, CreateArgument());
 }
示例#6
0
 protected override void PreExecution(System.Collections.Generic.IDictionary <string, string> variables, Helpers.ColoredTextWriter output)
 {
     if (string.IsNullOrWhiteSpace(this.Command))
     {
         throw new InvalidOperationException("Cannot run a shell command with a command.");
     }
 }