Ejemplo n.º 1
0
 public DotnetFormatCommandSource(RootCommandSource root, CommandSourceBase parent)
     : base(new Command("dotnet-format", ""), parent)
 {
     FolderOption = GetFolder();
     Command.Add(FolderOption);
     FilesOption = GetFiles();
     Command.Add(FilesOption);
     ExcludeOption = GetExclude();
     Command.Add(ExcludeOption);
     CheckOption = GetCheck();
     Command.Add(CheckOption);
     ReportOption = GetReport();
     Command.Add(ReportOption);
     VerbosityOption = GetVerbosity();
     Command.Add(VerbosityOption);
     InvokeCommand = new InvokeCommandSource(this, this);
     Command.AddCommand(InvokeCommand.Command);
     Command.Handler = CommandHandler.Create((InvocationContext context) =>
     {
         CurrentCommandSource = this;
         CurrentParseResult   = context.ParseResult;
         return(0);
     });
 }
Ejemplo n.º 2
0
 public InvokeCommandSourceResult(ParseResult parseResult, InvokeCommandSource commandSource, int exitCode)
     : base(parseResult, (commandSource.ParentCommandSource as DotnetFormatCommandSource), exitCode)
 {
 }