Remove duplicate files
This commit is contained in:
@@ -1,10 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<RootNamespace>AOC.Runner</RootNamespace>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
using AOC.Runner;
|
|
||||||
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Reflection;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AdventOfCode;
|
|
||||||
public class AOCRunner
|
|
||||||
{
|
|
||||||
public AOCRunner()
|
|
||||||
{
|
|
||||||
FindProblemClasses();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void FindProblemClasses()
|
|
||||||
{
|
|
||||||
|
|
||||||
var types = Assembly.GetExecutingAssembly()?.DefinedTypes.Where(t => t.IsAssignableTo(typeof(IProblemBase)));
|
|
||||||
if (types == null)
|
|
||||||
return;
|
|
||||||
foreach (var type in types)
|
|
||||||
{
|
|
||||||
Console.WriteLine(type.Name);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
namespace AOC.Runner;
|
|
||||||
public interface IProblemBase
|
|
||||||
{
|
|
||||||
void LoadInput();
|
|
||||||
|
|
||||||
void CalculatePart1();
|
|
||||||
|
|
||||||
void PrintPart1();
|
|
||||||
|
|
||||||
void CalculatePart2();
|
|
||||||
void PrintPart2();
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
namespace AOC.Runner;
|
|
||||||
public class ProblemInfoAttribute : Attribute
|
|
||||||
{
|
|
||||||
public int Day { get; init; }
|
|
||||||
public string Year { get; init; }
|
|
||||||
public string Name { get; init; }
|
|
||||||
public ProblemInfoAttribute(string year, int day, string name)
|
|
||||||
{
|
|
||||||
Year = year;
|
|
||||||
Day = day;
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,15 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup>
|
|
||||||
<MSBuildAllProjects Condition="'$(MSBuildVersion)' == '' Or '$(MSBuildVersion)' < '16.0'">$(MSBuildAllProjects);$(MSBuildThisFileFullPath)</MSBuildAllProjects>
|
|
||||||
<HasSharedItems>true</HasSharedItems>
|
|
||||||
<SharedGUID>2a85c7ef-9de8-4c58-b15c-4d4393590b3f</SharedGUID>
|
|
||||||
</PropertyGroup>
|
|
||||||
<PropertyGroup Label="Configuration">
|
|
||||||
<Import_RootNamespace>AOC.Shared</Import_RootNamespace>
|
|
||||||
</PropertyGroup>
|
|
||||||
<ItemGroup>
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)AOCAttribute.cs" />
|
|
||||||
<Compile Include="$(MSBuildThisFileDirectory)ProblemBase.cs" />
|
|
||||||
</ItemGroup>
|
|
||||||
</Project>
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
||||||
<PropertyGroup Label="Globals">
|
|
||||||
<ProjectGuid>2a85c7ef-9de8-4c58-b15c-4d4393590b3f</ProjectGuid>
|
|
||||||
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
|
|
||||||
</PropertyGroup>
|
|
||||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.Default.props" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.Common.props" />
|
|
||||||
<PropertyGroup />
|
|
||||||
<Import Project="AOC.Shared.projitems" Label="Shared" />
|
|
||||||
<Import Project="$(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)\CodeSharing\Microsoft.CodeSharing.CSharp.targets" />
|
|
||||||
</Project>
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Text;
|
|
||||||
|
|
||||||
namespace AOC.Shared
|
|
||||||
{
|
|
||||||
public class ProblemInfoAttribute : Attribute
|
|
||||||
{
|
|
||||||
public int Day { get; init; }
|
|
||||||
public string Year { get; init; }
|
|
||||||
public string Name { get; init; }
|
|
||||||
public ProblemInfoAttribute(string year, int day, string name) {
|
|
||||||
Year = year;
|
|
||||||
Day = day;
|
|
||||||
Name = name;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
namespace AOC.Shared
|
|
||||||
{
|
|
||||||
public interface IProblemBase
|
|
||||||
{
|
|
||||||
void LoadInput();
|
|
||||||
|
|
||||||
void CalculatePart1();
|
|
||||||
|
|
||||||
void PrintPart1();
|
|
||||||
|
|
||||||
void CalculatePart2();
|
|
||||||
void PrintPart2();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\AOC Runner\AOC Runner.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
using AOC.Runner;
|
|
||||||
|
|
||||||
namespace AOC2022;
|
|
||||||
[ProblemInfo("2022", 0, "Test")]
|
|
||||||
public class TestProblem : IProblemBase
|
|
||||||
{
|
|
||||||
public void LoadInput()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CalculatePart1()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CalculatePart2()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void PrintPart1()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Result");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrintPart2()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Result 2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
<Project Sdk="Microsoft.NET.Sdk">
|
|
||||||
|
|
||||||
<PropertyGroup>
|
|
||||||
<TargetFramework>net7.0</TargetFramework>
|
|
||||||
<ImplicitUsings>enable</ImplicitUsings>
|
|
||||||
<Nullable>enable</Nullable>
|
|
||||||
</PropertyGroup>
|
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<ProjectReference Include="..\AOC Runner\AOC Runner.csproj" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
|
||||||
@@ -1,32 +0,0 @@
|
|||||||
using AOC.Runner;
|
|
||||||
|
|
||||||
namespace AOC2023;
|
|
||||||
[ProblemInfo("2023", 0, "Test")]
|
|
||||||
public class TestProblem : IProblemBase
|
|
||||||
{
|
|
||||||
public void LoadInput()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CalculatePart1()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void CalculatePart2()
|
|
||||||
{
|
|
||||||
Thread.Sleep(1000);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void PrintPart1()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Result");
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PrintPart2()
|
|
||||||
{
|
|
||||||
Console.WriteLine("Result 2");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user