From 03c6ab60efae3b97ecb0f0ee48a3924aa0e9fc8f Mon Sep 17 00:00:00 2001 From: Parnic Date: Fri, 10 Dec 2021 23:51:57 -0600 Subject: [PATCH] Update template I found out that C# 10 added file-scoped namespaces that don't need the whole thing to be wrapped in braces, so that's neat. --- src/Template.cs | 41 ++++++++++++++++++++--------------------- 1 file changed, 20 insertions(+), 21 deletions(-) diff --git a/src/Template.cs b/src/Template.cs index 1b7518a..c6d9115 100644 --- a/src/Template.cs +++ b/src/Template.cs @@ -1,29 +1,28 @@ -namespace aoc2021 +namespace aoc2021; + +internal class DayTemplate { - internal class DayTemplate + internal static void Go() { - internal static void Go() - { - Logger.Log("Day #"); - Logger.Log("-----"); - var lines = File.ReadAllLines("inputs/##.txt"); - Part1(lines); - Part2(lines); - Logger.Log(""); - } + Logger.Log("Day #"); + Logger.Log("-----"); + var lines = File.ReadAllLines("inputs/##.txt"); + Part1(lines); + Part2(lines); + Logger.Log(""); + } - private static void Part1(IEnumerable lines) - { - using var t = new Timer(); + private static void Part1(IEnumerable lines) + { + using var t = new Timer(); - Logger.Log($"part1: "); - } + Logger.Log($"part1: "); + } - private static void Part2(IEnumerable lines) - { - using var t = new Timer(); + private static void Part2(IEnumerable lines) + { + using var t = new Timer(); - Logger.Log($"part2: "); - } + Logger.Log($"part2: "); } }