From 48362b079dea51976266acffa6f3047c2a0a13c0 Mon Sep 17 00:00:00 2001 From: "Dylan R. E. Moonfire" Date: Sat, 2 Apr 2022 18:52:44 -0500 Subject: [PATCH] fix: cleaning up some refactoring bugs --- .../MfGames.ToolBuilder.Tables.csproj | 22 +++++++++---------- .../ToolBuilderTablesModule.cs | 18 +++++++++++++++ .../ToolBuilderTestContext.cs | 2 ++ tests/SampleTool/Program.cs | 2 ++ 4 files changed, 33 insertions(+), 11 deletions(-) create mode 100644 src/MfGames.ToolBuilder.Tables/ToolBuilderTablesModule.cs diff --git a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj index 00b3670..dff32f0 100644 --- a/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj +++ b/src/MfGames.ToolBuilder.Tables/MfGames.ToolBuilder.Tables.csproj @@ -8,13 +8,13 @@ - - - - - - - + + + + + + + all runtime; build; native; contentfiles; analyzers; buildtransitive @@ -27,13 +27,13 @@ all runtime; build; native; contentfiles; analyzers; buildtransitive - - - + + + - + diff --git a/src/MfGames.ToolBuilder.Tables/ToolBuilderTablesModule.cs b/src/MfGames.ToolBuilder.Tables/ToolBuilderTablesModule.cs new file mode 100644 index 0000000..b8a0d1b --- /dev/null +++ b/src/MfGames.ToolBuilder.Tables/ToolBuilderTablesModule.cs @@ -0,0 +1,18 @@ +using Autofac; + +namespace MfGames.ToolBuilder.Tables; + +/// +/// The Autofac module to pull in the components inside this assembly. +/// +public class ToolBuilderTablesModule : Module +{ + /// + protected override void Load(ContainerBuilder builder) + { + builder + .RegisterType() + .AsSelf() + .AsImplementedInterfaces(); + } +} diff --git a/tests/MfGames.ToolBuilder.Tests/ToolBuilderTestContext.cs b/tests/MfGames.ToolBuilder.Tests/ToolBuilderTestContext.cs index f06fff8..cd9a943 100644 --- a/tests/MfGames.ToolBuilder.Tests/ToolBuilderTestContext.cs +++ b/tests/MfGames.ToolBuilder.Tests/ToolBuilderTestContext.cs @@ -1,6 +1,7 @@ using Autofac; using MfGames.TestSetup; +using MfGames.ToolBuilder.Tables; namespace MfGames.ToolBuilder.Tests { @@ -11,6 +12,7 @@ namespace MfGames.ToolBuilder.Tests { base.ConfigureContainer(builder); builder.RegisterModule(); + builder.RegisterModule(); } } } diff --git a/tests/SampleTool/Program.cs b/tests/SampleTool/Program.cs index 918d8a3..d136f30 100644 --- a/tests/SampleTool/Program.cs +++ b/tests/SampleTool/Program.cs @@ -3,6 +3,7 @@ using System.Threading.Tasks; using Autofac; using MfGames.ToolBuilder; +using MfGames.ToolBuilder.Tables; namespace SampleTool { @@ -20,6 +21,7 @@ namespace SampleTool private static void ConfigureContainer(ContainerBuilder builder) { builder.RegisterModule(); + builder.RegisterModule(); } } }