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();
        }
Example #2
0
        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();
        }
Example #3
0
        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();
        }