예제 #1
0
        public static FightBuilder ConfigureMessageServices(this FightBuilder fightBuilder, Action <MessageServiceBuilder> setupAction)
        {
            MessageServiceBuilder builder = new MessageServiceBuilder(fightBuilder.Services);

            setupAction?.Invoke(builder);
            builder.Build();
            return(fightBuilder);
        }
 public static MessageServiceBuilder UseLotteryOrderingMessagePublisher(this MessageServiceBuilder messageServiceBuilder)
 {
     messageServiceBuilder.Services.AddTransient <ILotteryOrderingMessageService, LotteryOrderingMessageService>();
     return(messageServiceBuilder);
 }
예제 #3
0
 public static MessageServiceBuilder UseLotteryDispatchingMessagePublisher(this MessageServiceBuilder messageServiceBuilder)
 {
     messageServiceBuilder.Services.AddSingleton <IDispatchOrderingMessageService, DispatchOrderingMessagePublisher>();
     messageServiceBuilder.Services.AddSingleton <IDispatchQueryingMessageService, DispatchQueryingMessagePublisher>();
     return(messageServiceBuilder);
 }