protected override void Context() { _dummyDispatchCommits = new DummyDispatchCommits(); _eventStore = Wireup .Init() .UsingInMemoryPersistence() .DoNotDispatchCommits() .Build(); }
protected override void Context() { _dummyDispatchCommits = new DummyDispatchCommits(); _eventStore = Wireup .Init() .UsingInMemoryPersistence() .UsingSynchronousDispatchScheduler() .DispatchTo(_dummyDispatchCommits) .Build(); }
private static void EventStoreTest() { Guid StreamId = Guid.NewGuid(); var bus = ServiceBusFactory.New(sbc => { }); var store = Wireup.Init() .LogToOutputWindow() .UsingInMemoryPersistence() .UsingSqlPersistence("EventStoreConnection") // Connection string is in app.config .WithDialect(new MsSqlDialect()) .EnlistInAmbientTransaction() // two-phase commit .InitializeStorageEngine() .TrackPerformanceInstance("example") .UsingJsonSerialization() .Compress() .EncryptWith(EncryptionKey) .HookIntoPipelineUsing(new[] { new AuthorizationPipelineHook() }) .UsingSynchronousDispatchScheduler() .DispatchTo(new DelegateMessageDispatcher(DispatchCommit)) .Build(); using (store) { using (var stream = store.CreateStream(StreamId)) { stream.Add(new EventMessage() { Body = "Hello World!" }); stream.CommitChanges(StreamId); } using (var stream = store.OpenStream(StreamId, 0, int.MinValue)) { foreach (var evnt in stream.CommittedEvents) { Console.WriteLine(evnt.Body); } } } }
protected override Task Context() { _wireup = Wireup.Init() .UsingInMemoryPersistence(); return(Task.FromResult(true)); }
protected override void Context() { _wireup = Wireup.Init() // .UsingInMemoryPersistence() // the InMemoryPersistence should be the default serializer .UseTestableWireup(); }
protected override Task Context() { _wireup = Wireup.Init() .UsingInMemoryPersistence(); return(Task.CompletedTask); }
protected override void Context() { _wireup = Wireup.Init() .UsingSqlPersistence("fakeConnectionString") .WithDialect(new Persistence.Sql.SqlDialects.MsSqlDialect()); }
protected override void Context() { _wireup = Wireup.Init() .UsingInMemoryPersistence(); }