Exemplo n.º 1
0
        public static void Setup()
        {
            Dispatcher = new MessageDispatcher(new InMemoryEventStore());

            Dispatcher.ScanInstance(new TabCommandHandlers());

            OpenTabQueries = new OpenTabs();
            Dispatcher.ScanInstance(OpenTabQueries);

            ChefTodoListQueries = new ChefTodoList();
            Dispatcher.ScanInstance(ChefTodoListQueries);
        }
Exemplo n.º 2
0
        public static void Setup()
        {
            Dispatcher = new MessageDispatcher(new InMemoryEventStore());

            Dispatcher.ScanInstance(new TabCommandHandlers());

            OpenTabQueries = new OpenTabs();
            Dispatcher.ScanInstance(OpenTabQueries);

            ChefTodoListQueries = new ChefTodoList();
            Dispatcher.ScanInstance(ChefTodoListQueries);
        }
Exemplo n.º 3
0
        public static void Setup()
        {
            var eventStorage = new CloudTableStore();
            Dispatcher = new MessageDispatcher(eventStorage);

            Dispatcher.ScanInstance(new TabCommandHandlers());

            OpenTabQueries = new OpenTabs();
            Dispatcher.ScanInstance(OpenTabQueries);

            ChefTodoListQueries = new ChefTodoList();
            Dispatcher.ScanInstance(ChefTodoListQueries);

            var aggregates = eventStorage.GetAllAggregates();
            foreach (var agg in aggregates)
                Dispatcher.GetType().GetMethod("ReplayEvents")
                    .MakeGenericMethod(agg.Item1)
                    .Invoke(Dispatcher, new object[] { agg.Item2 });
        }