private static RaventEventStorage GetEventStorage(IBus eventBus) { #if DEBUG var eventStorage = new ReadOnlyRavenEventStorage(new ServerStoreFactory(), eventBus); #else var eventStorage = new RaventEventStorage(new ServerStoreFactory(), eventBus); #endif return eventStorage; }
private static RaventEventStorage GetEventStorage(IBus eventBus) { #if DEBUG var eventStorage = new ReadOnlyRavenEventStorage(new ServerStoreFactory(), eventBus); #else var eventStorage = new RaventEventStorage(new ServerStoreFactory(), eventBus); #endif return(eventStorage); }
private static void Main(string[] args) { //throw new UnauthorizedAccessException("This migration is complete dont run twice."); Console.WriteLine("Starting migration"); var bus = new DomainBus(); var destinationStorage = new RaventEventStorage(new ServerStoreFactory("RavenHq"), bus); var handler = new MigrationHandler(destinationStorage); bus.RegisterHandler(()=>handler); new RaventEventStorage(new ServerStoreFactory(), bus); Console.WriteLine("Migration complete"); Console.ReadKey(); }
private static void Main(string[] args) { //throw new UnauthorizedAccessException("This migration is complete dont run twice."); Console.WriteLine("Starting migration"); var bus = new DomainBus(); var destinationStorage = new RaventEventStorage(new ServerStoreFactory("RavenHq"), bus); var handler = new MigrationHandler(destinationStorage); bus.RegisterHandler(() => handler); new RaventEventStorage(new ServerStoreFactory(), bus); Console.WriteLine("Migration complete"); Console.ReadKey(); }