-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
27 lines (22 loc) · 777 Bytes
/
Program.cs
File metadata and controls
27 lines (22 loc) · 777 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
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
using Spectre.Console.Cli;
using Spectre.Console.Cli.Extensions.DependencyInjection;
using TouchDirWithFileDate.Commands;
var serviceCollection = new ServiceCollection()
.AddLogging(configure =>
configure
.AddSimpleConsole(opts => {
opts.TimestampFormat = "yyyy-MM-dd HH:mm:ss ";
})
);
using var registrar = new DependencyInjectionRegistrar(serviceCollection);
var app = new CommandApp(registrar);
app.Configure(
config =>
{
config.ValidateExamples();
config.Settings.ApplicationName = "TouchDirWithFileDate";
});
app.SetDefaultCommand<TouchCommand>();
return await app.RunAsync(args);