-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(Program): accept day as arg through dotnet run
- Loading branch information
Showing
3 changed files
with
10 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
using AdventOfCode.Solutions; | ||
using AdventOfCode.Services; | ||
using AdventOfCode.Solutions; | ||
|
||
Console.WriteLine(); | ||
foreach (var solution in SolutionCollector.FetchSolutions()) | ||
var year = ConfigurationService.GetYear(); | ||
var days = ConfigurationService.GetDays(); | ||
|
||
if (args.Length > 0 && int.TryParse(args.First(), out int day)) days = new[] { day }; | ||
|
||
foreach (var solution in SolutionCollector.FetchSolutions(year, days)) | ||
{ | ||
Console.WriteLine(solution.ToString()); | ||
} |