コード例 #1
0
        static void Main(string[] args)
        {
            Console.WindowHeight = 30;
            Console.WindowWidth  = 150;

            var bus        = new InProcessEventBus(true);
            var eventStore = Program.GetBrowsableEventStore();
            var buffer     = new InMemoryBufferedBrowsableElementStore(eventStore, 20 /*magic number found in ThresholdFetchPolicy*/);

            bus.RegisterAllHandlersInAssembly(typeof(MyNotes.Denormalizers.NoteDenormalizer).Assembly);
            BootStrapper.BootUp(buffer);

            var pipeline = Pipeline.Create("Default", new EventBusProcessor(bus), buffer);

            pipeline.Start();

            var commandServiceHost = new ServiceHost(typeof(CommandWebService));

            commandServiceHost.Open();

            Console.ReadLine();

            commandServiceHost.Close();
            pipeline.Stop();
        }
コード例 #2
0
ファイル: BootStrapper.cs プロジェクト: HAXEN/ncqrs
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();
            bus.RegisterAllHandlersInAssembly(typeof(NoteItemDenormalizer).Assembly);

            return bus;
        }
コード例 #3
0
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();

            bus.RegisterAllHandlersInAssembly(typeof(BootStrapper).Assembly);

            return bus;
        }
コード例 #4
0
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();

            bus.RegisterAllHandlersInAssembly(typeof(NoteItemDenormalizer).Assembly);

            return(bus);
        }
コード例 #5
0
ファイル: Bootstrapper.cs プロジェクト: stgolem/Scrumr
        private static IEventBus BuildEventBus()
        {
            var denormalizerAssembly = typeof (ProjectDenormalizer).Assembly;

            var bus = new InProcessEventBus();
            bus.RegisterAllHandlersInAssembly(denormalizerAssembly);

            return bus;
        }
コード例 #6
0
        private static IEventBus BuildEventBus()
        {
            var denormalizerAssembly = typeof(ProjectDenormalizer).Assembly;

            var bus = new InProcessEventBus();

            bus.RegisterAllHandlersInAssembly(denormalizerAssembly);

            return(bus);
        }
コード例 #7
0
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();

            // 2 opties: registreer denormalizers stuk voor stuk of registreer de gehele assembly

            //bus.RegisterHandler(new VoyageCreatedDenormalizer());
            //bus.RegisterHandler(new CargoCreatedDenormalizer());
            //bus.RegisterHandler(new CargoAddedToVoyageUpdateCapacityDenormalizer());
            //bus.RegisterHandler(new CargoAddedToVoyageUpdateCargoDenormalizer());

            bus.RegisterAllHandlersInAssembly(Assembly.Load("ReadModel"));

            return bus;
        }
コード例 #8
0
        static void Main(string[] args)
        {
            // Register all denormalizers in this assembly.
            _bus.RegisterAllHandlersInAssembly(typeof(Program).Assembly);

            var connectionString    = Settings.Default.EventStoreConnectionString;
            var browsableEventStore = new MsSqlServerEventStoreElementStore(connectionString);
            var pipeline            = Pipeline.Create(new CallbackEventProcessor(Process), browsableEventStore);

            pipeline.Start();

            Console.ReadLine();

            pipeline.Stop();
        }
コード例 #9
0
ファイル: Program.cs プロジェクト: kajaljatakia/ncqrs
        static void Main(string[] args)
        {
            var bus = new InProcessEventBus(true);
            bus.RegisterAllHandlersInAssembly(typeof(Program).Assembly);
            var browsableEventStore = new MsSqlServerEventStoreElementStore(Settings.Default.EventStoreConnectionString);
            var buffer = new InMemoryBufferedBrowsableElementStore(browsableEventStore, 20 /*magic number faund in ThresholedFetchPolicy*/);
            var pipeline = Pipeline.Create("Default", new EventBusProcessor(bus), buffer);

            BootStrapper.BootUp(buffer);
            var commandServiceHost = new ServiceHost(typeof(CommandWebService));

            commandServiceHost.Open();
            pipeline.Start();

            Console.ReadLine();

            pipeline.Stop();
            commandServiceHost.Close();
        }
コード例 #10
0
ファイル: Program.cs プロジェクト: mojamcpds/ncqrs
        static void Main(string[] args)
        {
            var bus = new InProcessEventBus(true);

            bus.RegisterAllHandlersInAssembly(typeof(Program).Assembly);
            var browsableEventStore = new MsSqlServerEventStoreElementStore(Settings.Default.EventStoreConnectionString);
            var buffer   = new InMemoryBufferedBrowsableElementStore(browsableEventStore, 20 /*magic number faund in ThresholedFetchPolicy*/);
            var pipeline = Pipeline.Create("Default", new EventBusProcessor(bus), buffer);

            BootStrapper.BootUp(buffer);
            var commandServiceHost = new ServiceHost(typeof(CommandWebService));

            commandServiceHost.Open();
            pipeline.Start();

            Console.ReadLine();

            pipeline.Stop();
            commandServiceHost.Close();
        }
コード例 #11
0
ファイル: Program.cs プロジェクト: GattakaN/Ncqrs
        static void Main(string[] args)
        {
            Console.WindowHeight = 30;
            Console.WindowWidth = 150;

            var bus = new InProcessEventBus(true);
            var eventStore = Program.GetBrowsableEventStore();
            var buffer = new InMemoryBufferedBrowsableElementStore(eventStore, 20 /*magic number found in ThresholdFetchPolicy*/);

            bus.RegisterAllHandlersInAssembly(typeof(MyNotes.Denormalizers.NoteDenormalizer).Assembly);
            BootStrapper.BootUp(buffer);

            var pipeline = Pipeline.Create("Default", new EventBusProcessor(bus), buffer);
            pipeline.Start();

            var commandServiceHost = new ServiceHost(typeof(CommandWebService));
            commandServiceHost.Open();

            Console.ReadLine();

            commandServiceHost.Close();
            pipeline.Stop();
        }
コード例 #12
0
ファイル: QueueMonitor.cs プロジェクト: DavidHoerster/BuzzyGo
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();

            //TODO: need to register handlers here!!
            bus.RegisterAllHandlersInAssembly(typeof(BuzzyGo.Denormalizer.Card).Assembly);

            return bus;
        }
コード例 #13
0
ファイル: Bootstrapper.cs プロジェクト: pullpush/NAd
        private static IEventBus InitializeEventBus()
        {
            var bus = new InProcessEventBus();

            bus.RegisterAllHandlersInAssembly(typeof(Bootstrapper).Assembly);
            //bus.RegisterHandler(new InMemoryBufferedEventHandler(buffer));

            return bus;
        }