From d725a9e52e29d1080aa8632ce5270aabfb0a26fc Mon Sep 17 00:00:00 2001 From: Parnic Date: Wed, 30 Nov 2022 17:39:40 -0600 Subject: [PATCH] Add Rider files, apply Rider suggestions --- .idea/.idea.advent-of-code-2022/.idea/.gitignore | 13 +++++++++++++ .idea/.idea.advent-of-code-2022/.idea/encodings.xml | 4 ++++ .../.idea.advent-of-code-2022/.idea/indexLayout.xml | 8 ++++++++ .idea/.idea.advent-of-code-2022/.idea/vcs.xml | 6 ++++++ src/main.cs | 12 +++--------- 5 files changed, 34 insertions(+), 9 deletions(-) create mode 100644 .idea/.idea.advent-of-code-2022/.idea/.gitignore create mode 100644 .idea/.idea.advent-of-code-2022/.idea/encodings.xml create mode 100644 .idea/.idea.advent-of-code-2022/.idea/indexLayout.xml create mode 100644 .idea/.idea.advent-of-code-2022/.idea/vcs.xml diff --git a/.idea/.idea.advent-of-code-2022/.idea/.gitignore b/.idea/.idea.advent-of-code-2022/.idea/.gitignore new file mode 100644 index 0000000..cd99ed2 --- /dev/null +++ b/.idea/.idea.advent-of-code-2022/.idea/.gitignore @@ -0,0 +1,13 @@ +# Default ignored files +/shelf/ +/workspace.xml +# Rider ignored files +/.idea.advent-of-code-2022.iml +/modules.xml +/projectSettingsUpdater.xml +/contentModel.xml +# Editor-based HTTP Client requests +/httpRequests/ +# Datasource local storage ignored files +/dataSources/ +/dataSources.local.xml diff --git a/.idea/.idea.advent-of-code-2022/.idea/encodings.xml b/.idea/.idea.advent-of-code-2022/.idea/encodings.xml new file mode 100644 index 0000000..df87cf9 --- /dev/null +++ b/.idea/.idea.advent-of-code-2022/.idea/encodings.xml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/.idea.advent-of-code-2022/.idea/indexLayout.xml b/.idea/.idea.advent-of-code-2022/.idea/indexLayout.xml new file mode 100644 index 0000000..7b08163 --- /dev/null +++ b/.idea/.idea.advent-of-code-2022/.idea/indexLayout.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/.idea.advent-of-code-2022/.idea/vcs.xml b/.idea/.idea.advent-of-code-2022/.idea/vcs.xml new file mode 100644 index 0000000..94a25f7 --- /dev/null +++ b/.idea/.idea.advent-of-code-2022/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/src/main.cs b/src/main.cs index 198e476..79606b1 100644 --- a/src/main.cs +++ b/src/main.cs @@ -32,14 +32,8 @@ foreach (var arg in args) if (runPart1 != null || runPart2 != null) { - if (runPart1 == null) - { - runPart1 = false; - } - if (runPart2 == null) - { - runPart2 = false; - } + runPart1 ??= false; + runPart2 ??= false; } if (runAll) @@ -59,7 +53,7 @@ else } else { - var type = types.FirstOrDefault(x => x.Name == $"Day{desiredDay?.PadLeft(2, '0')}"); + var type = types.FirstOrDefault(x => x.Name == $"Day{desiredDay.PadLeft(2, '0')}"); if (type == null) { Logger.Log($"Unknown day {desiredDay}");