-
Notifications
You must be signed in to change notification settings - Fork 261
Expand file tree
/
Copy pathProgram.cs
More file actions
29 lines (23 loc) · 765 Bytes
/
Copy pathProgram.cs
File metadata and controls
29 lines (23 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Copyright (c) Nate McMaster.
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information.
using System.Threading.Tasks;
using McMaster.Extensions.CommandLineUtils;
namespace StandardServices
{
[Command(Name = "di", Description = "Dependency Injection sample project")]
[HelpOption]
class Program
{
private readonly IConsole _console;
static Task<int> Main(string[] args) => CommandLineApplication.ExecuteAsync<Program>(args);
public Program(IConsole console)
{
_console = console;
}
private int OnExecute()
{
_console.WriteLine("Hello from your first application");
return 0;
}
}
}