private static async Task TestReadSide(Tenant tenant, string streamName, FakeLogFactory logFactory, TestConfigStore configStore) { var cw = new EventStreamConsumer(configStore, tenant, streamName, "PRODUCT-LEASE", logFactory); await cw.InitAsync(); await cw.RunAndBlock((evts) => { Console.Write("Event received ..", evts); }, CancellationToken.None); }
private static async Task Try() { var tenant = new Tenant { TenantId = Guid.Parse("{48A7FB91-7B14-4EB7-98FC-B145B6504BB6}"), Name = "ABC Company" }; var aggregateID = Guid.NewGuid(); var streamName = "productstream"; var logFactory = new FakeLogFactory(); var configStore = new TestConfigStore(logFactory); await TestReadSide(tenant, streamName, logFactory, configStore); //await TestAppendEvents(tenant, aggregateID, streamName, logFactory, configStore); }
private static async Task TestAppendEvents(Tenant tenant, Guid aggregateID, string streamName, FakeLogFactory logFactory, TestConfigStore configStore) { var eventStore = new EventStore(configStore, logFactory); await UseStreamApi(tenant, aggregateID, streamName, eventStore); await UseTxApi(tenant, aggregateID, streamName, eventStore); }