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); }
public static MessageServiceBuilder UseLotteryDispatchingMessagePublisher(this MessageServiceBuilder messageServiceBuilder) { messageServiceBuilder.Services.AddSingleton <IDispatchOrderingMessageService, DispatchOrderingMessagePublisher>(); messageServiceBuilder.Services.AddSingleton <IDispatchQueryingMessageService, DispatchQueryingMessagePublisher>(); return(messageServiceBuilder); }