public void SimpleRingTest() { IHostBuilder builder = TinkerHostBuilder.Create(); builder.ConfigureLogging(factory => factory.AddProvider(new ConsoleLoggerProvider((s, l) => true, true))); IHost host = builder.Build <Startup2>(); host.Start(); host.Dispose(); }
public void MultiSiloTest() { // create host IHostBuilder builder = TinkerHostBuilder.Create(); builder.ConfigureLogging(factory => factory.AddProvider(new ConsoleLoggerProvider((s, l) => true, true))); IHost host = builder.Build <MultiSiloStartup>(); host.Start(); host.Dispose(); }
public void StorageProviderInGrainTest() { // create host IHostBuilder builder = TinkerHostBuilder.Create(); builder.ConfigureLogging(factory => factory.AddProvider(new ConsoleLoggerProvider((s, l) => true, true))); IHost host = builder.Build <Startup>(); // start host host.Start(); // create grain SomePersistentGrain grain = host.Services.GetService <SomePersistentGrain>(); grain.OnActivateAsync().Wait(); grain.OnDeactivateAsync().Wait(); // shutdown host.Dispose(); }