ParseCommand

This commit is contained in:
Jon Sequeira 2017-03-09 10:53:17 -08:00
parent 4284c4e363
commit 998ac9c3eb
2 changed files with 24 additions and 0 deletions

View file

@ -54,6 +54,7 @@ namespace Microsoft.DotNet.Cli
["test"] = TestCommand.Run,
["vstest"] = VSTestCommand.Run,
["complete"] = CompleteCommand.Run,
["parse"] = ParseCommand.Run,
};
public static int Main(string[] args)

View file

@ -0,0 +1,23 @@
using System;
using System.Linq;
using Microsoft.DotNet.Cli.CommandLine;
using Microsoft.DotNet.Cli.Utils;
namespace Microsoft.DotNet.Cli
{
public class ParseCommand
{
public static int Run(string[] args)
{
DebugHelper.HandleDebugSwitch(ref args);
var resultOfParsingArg =
Parser.Instance.Parse(
args.Single());
Console.WriteLine(resultOfParsingArg.Diagram());
return 0;
}
}
}