提交 792d7095 编写于 作者: L Larry Golding

ProcessWatchdog: Add CommandLineParser NuGet package

上级 3941fade
// Copyright (c) Microsoft. All Rights Reserved. Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
namespace ProcessWatchdog
{
internal class Options
{
}
}
\ No newline at end of file
......@@ -26,6 +26,7 @@
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Options.cs" />
<Compile Include="Program.cs" />
<Compile Include="Resources.Designer.cs">
<AutoGen>True</AutoGen>
......
......@@ -5,14 +5,39 @@
using System.Globalization;
using System.Linq;
using System.Reflection;
using CommandLine;
namespace ProcessWatchdog
{
internal sealed class Program
{
private Options _options;
public Program(Options options)
{
_options = options;
}
private int Run()
{
return 0;
}
private static void Main(string[] args)
{
Banner();
Parser.Default.ParseArguments<Options>(args)
.MapResult(
options => Run(options),
err => 1);
}
private static int Run(Options options)
{
var program = new Program(options);
return program.Run();
}
private static void Banner()
......
{
"dependencies": {
{
"dependencies": {
"CommandLineParser": "2.0.273-beta",
"System.Collections.Immutable": "1.1.37",
"System.Reflection.Metadata": "1.2.0-rc2-23826"
},
"frameworks": {
"net45": { }
"net45": {}
},
"runtimes": {
"win7": { },
"win7-anycpu": { }
"win7": {},
"win7-anycpu": {}
}
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册