|
|
@ -2,6 +2,7 @@
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using Microsoft.Extensions.Logging;
|
|
|
|
using System;
|
|
|
|
using System;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
|
|
|
using System.Diagnostics;
|
|
|
|
|
|
|
|
|
|
|
|
namespace AOC2021.Models
|
|
|
|
namespace AOC2021.Models
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -23,8 +24,10 @@ namespace AOC2021.Models
|
|
|
|
public AOCResponse ExecuteDay(AOCRequest request)
|
|
|
|
public AOCResponse ExecuteDay(AOCRequest request)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
_request = request;
|
|
|
|
_request = request;
|
|
|
|
|
|
|
|
var timer = new Stopwatch();
|
|
|
|
try
|
|
|
|
try
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
timer.Start();
|
|
|
|
switch (request.Version)
|
|
|
|
switch (request.Version)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
case AOCVersion.A:
|
|
|
|
case AOCVersion.A:
|
|
|
@ -34,6 +37,8 @@ namespace AOC2021.Models
|
|
|
|
this._response = ExecutePartB();
|
|
|
|
this._response = ExecutePartB();
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
timer.Stop();
|
|
|
|
|
|
|
|
this._response.RunTime = timer.ElapsedMilliseconds.ToString();
|
|
|
|
this._response.Status = true;
|
|
|
|
this._response.Status = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
catch (Exception e)
|
|
|
|
catch (Exception e)
|
|
|
|