Client useful method in instance repository added

This commit is contained in:
2025-05-15 08:20:32 +03:00
parent 4638692305
commit 8e37eda0ae
10 changed files with 40 additions and 89 deletions
+3 -3
View File
@@ -46,8 +46,8 @@ class Program
var context = builder.GetModule<RemoteInstanceRepository>();
var factory =
context.GetSingleObject(typeof(IPrinterFactory),
builder.GetModule<IEndPointContext>()) as IPrinterFactory;
context.GetSingletonObject<IPrinterFactory>(
builder.GetModule<IEndPointContext>());
using (var disposingPrinter = factory.Create("Test"))
{
@@ -115,7 +115,7 @@ class Program
DemoCheck.Dispose = true;
var loadSingleton = context.GetSingleObject(typeof(ILoadTest), builder.GetModule<IEndPointContext>()) as ILoadTest;
var loadSingleton = context.GetSingletonObject<ILoadTest>(builder.GetModule<IEndPointContext>());
var cts = new CancellationTokenSource();