победа
This commit is contained in:
@@ -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<FrontendContextRepository>();
|
||||
|
||||
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();
|
||||
|
||||
Reference in New Issue
Block a user