Exemple #1
0
        public void Register(IDomainBuilder builder)
        {
            var handler = new FutureEventsSchedulingMessageHandler(_schedulingActor, _logger);

            builder.RegisterHandler <FutureEventScheduledEvent, FutureEventsSchedulingMessageHandler>(c => handler).AsSync();
            builder.RegisterHandler <FutureEventCanceledEvent, FutureEventsSchedulingMessageHandler>(c => handler).AsSync();
        }
 public void Register(IDomainBuilder builder)
 {
     builder.RegisterAggregate(new BalloonDependencyFactory());
     builder.RegisterHandler <BalloonCreated, CountingMessageHandler>().AsSync();
     builder.RegisterHandler <BalloonCreated, SlowCountingMessageHandler>(c => new SlowCountingMessageHandler(c.Publisher)).AsFireAndForget();
     builder.RegisterHandler <BalloonTitleChanged, CountingMessageHandler>().AsSync();
 }
        public void Register(IDomainBuilder builder)
        {
            builder.RegisterAggregate(new BalloonDependencyFactory());

            BalloonContext BalloonContextProducer() => new BalloonContext(_dbContextOptions);

            builder.RegisterHandler <BalloonTitleChanged, BalloonCatalogProjection>(c => new BalloonCatalogProjection(BalloonContextProducer, c.Publisher, c.Log))
            .AsSync();

            builder.RegisterHandler <BalloonCreated, BalloonCatalogProjection>(c => new BalloonCatalogProjection(BalloonContextProducer, c.Publisher, c.Log))
            .AsSync();
        }
        public void Register(IDomainBuilder builder)
        {
            builder.RegisterAggregate(new BalloonDependencyFactory());

            builder.RegisterHandler <BalloonCreated, BalloonCreatedFaultyProjection>
                (c => new BalloonCreatedFaultyProjection()).AsSync();

            builder.RegisterHandler <BalloonTitleChanged, BalloonTitleChangedFaultyMessageHandler>
                (c => new BalloonTitleChangedFaultyMessageHandler(c.Publisher)).AsSync();

            builder.RegisterHandler <BalloonTitleChanged, BalloonTitleChangedOddFaultyMessageHandler>
                (c => new BalloonTitleChangedOddFaultyMessageHandler(c.Publisher)).AsSync();
        }
 public void Register(IDomainBuilder builder)
 {
     builder.RegisterAggregate(BalloonDependencyFactory);
     builder.RegisterHandler <BalloonCreated, BalloonCreatedNotificator> (c => new BalloonCreatedNotificator(c.Publisher)).AsSync();
     builder.RegisterHandler <BalloonTitleChanged, BalloonTitleChangedNotificator>(c => new BalloonTitleChangedNotificator(c.Publisher)).AsSync();
 }
Exemple #6
0
 public void Register(IDomainBuilder builder)
 {
     builder.RegisterAggregate(DefaultAggregateDependencyFactory);
     builder.RegisterHandler <BalanceChangedEvent_V0, SampleProjectionBuilder>(c => new SampleProjectionBuilder(c.Publisher)).AsSync();
     builder.RegisterHandler <BalanceChangedEvent_V1, SampleProjectionBuilder>(c => new SampleProjectionBuilder(c.Publisher)).AsSync();
 }
 public void AsSync()
 {
     _builder.RegisterHandler(new MessageHandlerFactory <TMessage, THandler>(_producer, () =>
                                                                             new CustomRouteMap(r => r.RegisterSyncHandler <TMessage, THandler>())));
 }