diff --git a/Example.Backend/Example.Backend.csproj b/Example.Backend/Example.Backend.csproj index 11ba0ab..62581cc 100644 --- a/Example.Backend/Example.Backend.csproj +++ b/Example.Backend/Example.Backend.csproj @@ -7,12 +7,6 @@ enable - - - ..\mROA.Test\bin\Debug\net9.0\Example.Shared.dll - - - diff --git a/Example.Frontend/Example.Frontend.csproj b/Example.Frontend/Example.Frontend.csproj index 62581cc..a29c991 100644 --- a/Example.Frontend/Example.Frontend.csproj +++ b/Example.Frontend/Example.Frontend.csproj @@ -11,4 +11,7 @@ + + + diff --git a/Example.Frontend/Program.cs b/Example.Frontend/Program.cs index 2a247b8..e0da284 100644 --- a/Example.Frontend/Program.cs +++ b/Example.Frontend/Program.cs @@ -1,8 +1,8 @@ // See https://aka.ms/new-console-template for more information + using System.Net; using System.Text; -using Example.Shared; using mROA.Codegen; using mROA.Implementation; using mROA.Implementation.Bootstrap; @@ -11,13 +11,14 @@ var mixer = new FullMixBuilder(); mixer.Modules.Add(new FrontendContextRepository()); mixer.Modules.Add(new JsonFrontendSerialisationModule()); -mixer.Modules.Add(new StreamBasedInteractionModule()); +mixer.Modules.Add(new StreamBasedFrontendInteractionModule()); mixer.Modules.Add(new NetworkFrontendBridge(new IPEndPoint(IPAddress.Loopback, 4567))); mixer.Build(); var context = mixer.GetModule(); -var factory = context.GetSingleObject(typeof(IPrinterFactory)) as IPrinterFactory; +var factory = context.GetSingleObject(typeof(Example.Shared.IPrinterFactory)) as Example.Shared.IPrinterFactory; + var printer = factory.Create("Test"); var name = printer.Value.GetName(); diff --git a/Example.Shared/Example.Shared.csproj b/Example.Shared/Example.Shared.csproj index f3e957f..d303a62 100644 --- a/Example.Shared/Example.Shared.csproj +++ b/Example.Shared/Example.Shared.csproj @@ -7,7 +7,9 @@ - + diff --git a/mROA.Codegen/SampleIncrementalSourceGenerator.cs b/mROA.Codegen/SampleIncrementalSourceGenerator.cs index 13a8462..2cbc31a 100644 --- a/mROA.Codegen/SampleIncrementalSourceGenerator.cs +++ b/mROA.Codegen/SampleIncrementalSourceGenerator.cs @@ -298,6 +298,9 @@ public class FrontendContextRepository : IContextRepository {{ if (dependency is ISerialisationModule.IFrontendSerialisationModule serialisationModule) _serialisationModule = serialisationModule; + + TransmissionConfig.DefaultContextRepository = this; + Console.WriteLine(""Added""); }} public void Bake() diff --git a/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs b/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs index cd4dd4d..c13aac7 100644 --- a/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs +++ b/mROA.Codegen/obj/Debug/netstandard2.0/mROA.Codegen.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cc5c595948305981ceadef95889ffeab017dd2b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed4e97e40f713de9270db709d05167c00f9c565b")] [assembly: System.Reflection.AssemblyProductAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA.Codegen")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs b/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs index 729ac3b..30194f9 100644 --- a/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs +++ b/mROA.Test/obj/Debug/net9.0/mROA.Test.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+cc5c595948305981ceadef95889ffeab017dd2b7")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed4e97e40f713de9270db709d05167c00f9c565b")] [assembly: System.Reflection.AssemblyProductAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA.Test")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")] diff --git a/mROA/Implementation/Frontend/NetworkFrontendBridge.cs b/mROA/Implementation/Frontend/NetworkFrontendBridge.cs index 8c2b395..2941d37 100644 --- a/mROA/Implementation/Frontend/NetworkFrontendBridge.cs +++ b/mROA/Implementation/Frontend/NetworkFrontendBridge.cs @@ -9,7 +9,8 @@ public class NetworkFrontendBridge : IFrontendBridge private TcpClient _tcpClient; public NetworkFrontendBridge(IPEndPoint serverEndPoint) { - _tcpClient = new TcpClient(serverEndPoint); + _tcpClient = new TcpClient(); + _tcpClient.Connect(serverEndPoint); } public void Inject(T dependency) { diff --git a/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs b/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs index 7311ff8..dd40c01 100644 --- a/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs +++ b/mROA/obj/Debug/net9.0/mROA.AssemblyInfo.cs @@ -13,7 +13,7 @@ using System.Reflection; [assembly: System.Reflection.AssemblyCompanyAttribute("mROA")] [assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")] [assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")] -[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+5e805a28b0513eecaf35aff9e64a3ec55c2850ed")] +[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+ed4e97e40f713de9270db709d05167c00f9c565b")] [assembly: System.Reflection.AssemblyProductAttribute("mROA")] [assembly: System.Reflection.AssemblyTitleAttribute("mROA")] [assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]