27 lines
689 B
C#
27 lines
689 B
C#
using AdventOfCode.Solutions;
|
|
using AdventOfCode.Core.Shared;
|
|
using AdventOfCode.Core;
|
|
using Microsoft.Extensions.Hosting;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
|
|
|
|
IChallange challange = Host.CreateDefaultBuilder()
|
|
.ConfigureServices(ConfigureServices)
|
|
.Build()
|
|
.Services
|
|
.GetService<SolutionManager>()
|
|
.GetChallange(2024, 1);
|
|
|
|
Console.WriteLine($"Part 1: {await challange.GetSolutionPart1()}");
|
|
|
|
Console.WriteLine($"Part 2: {await challange.GetSolutionPart2()}");
|
|
|
|
static void ConfigureServices(IServiceCollection services)
|
|
{
|
|
|
|
|
|
services
|
|
.AddChallanges()
|
|
.AddTransient<InputReader, InputReader>()
|
|
.AddScoped<SolutionManager>();
|
|
} |