public async static Task StartClient() { try { var configRoot = TestSilo.GetConfiguration(); var builder = new ClientBuilder() .WithClusterConfig(configRoot) .WithParts() .WithRabbitMQ(configRoot) .ConfigureLogging(logging => { logging.AddConfiguration(configRoot.GetSection("Logging")).AddConsole(); //logging.AddFile("./debug.txt"); }); clusterClient = builder.Build(); await clusterClient.Connect(); subscriptionHandle = await SubscribeStream(clusterClient); } catch (Exception exc) { Console.WriteLine(exc); Console.WriteLine("Failure Starting client."); throw exc; } }
public static int Main(string[] args) { TestSilo.StartSilo().Wait(); TestClient.StartClient().Wait(); WaitForKey(); TestClient.CloseClient().Wait(); return(TestSilo.StopSilo().Result); }