forked from pthorin/roundabound
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathProgram.cs
More file actions
23 lines (20 loc) · 817 Bytes
/
Program.cs
File metadata and controls
23 lines (20 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using Microsoft.Extensions.Configuration;
namespace Roundabound {
class Program {
static void Main(string[] args) {
var builder = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory())
.AddJsonFile("roundabound.cfg", optional : false, reloadOnChange : false)
.AddCommandLine(args);
IConfiguration configuration = builder.Build();
var rotationSets = configuration.GetSection("sets").Get<IEnumerable<RotationSet>>();
var logRotate = new LogRotate(rotationSets);
Console.Out.WriteLine($"What up {rotationSets.Count()}");
logRotate.Rotate();
}
}
}