Exemplo n.º 1
0
 /// <summary>The entry point for the SARIF multi utility.</summary>
 /// <param name="args">Arguments passed in from the tool's command line.</param>
 /// <returns>0 on success; nonzero on failure.</returns>
 public static int Main(string[] args)
 {
     return(Parser.Default.ParseArguments <
                ConvertOptions,
                RewriteOptions,
                MergeOptions,
                RebaseUriOptions,
                AbsoluteUriOptions,
                BaselineOptions>(args)
            .MapResult(
                (ConvertOptions convertOptions) => ConvertCommand.Run(convertOptions),
                (RewriteOptions rewriteOptions) => RewriteCommand.Run(rewriteOptions),
                (MergeOptions mergeOptions) => MergeCommand.Run(mergeOptions),
                (RebaseUriOptions rebaseOptions) => RebaseUriCommand.Run(rebaseOptions),
                (AbsoluteUriOptions absoluteUriOptions) => AbsoluteUriCommand.Run(absoluteUriOptions),
                (BaselineOptions baselineOptions) => BaselineCommand.Run(baselineOptions),
                errs => 1));
 }
Exemplo n.º 2
0
 /// <summary>The entry point for the SARIF multi utility.</summary>
 /// <param name="args">Arguments passed in from the tool's command line.</param>
 /// <returns>0 on success; nonzero on failure.</returns>
 public static int Main(string[] args)
 {
     return(Parser.Default.ParseArguments <
                ValidateOptions,
                ConvertOptions,
                RewriteOptions,
                TransformOptions,
                MergeOptions,
                RebaseUriOptions,
                AbsoluteUriOptions,
                ResultMatchingOptions>(args)
            .MapResult(
                (ValidateOptions validateOptions) => new ValidateCommand(new FileSystem()).Run(validateOptions),
                (ConvertOptions convertOptions) => ConvertCommand.Run(convertOptions),
                (RewriteOptions rewriteOptions) => RewriteCommand.Run(rewriteOptions),
                (TransformOptions transformOptions) => TransformCommand.Run(transformOptions),
                (MergeOptions mergeOptions) => MergeCommand.Run(mergeOptions),
                (RebaseUriOptions rebaseOptions) => RebaseUriCommand.Run(rebaseOptions),
                (AbsoluteUriOptions absoluteUriOptions) => AbsoluteUriCommand.Run(absoluteUriOptions),
                (ResultMatchingOptions baselineOptions) => ResultMatchingCommand.Run(baselineOptions),
                errs => 1));
 }