public GatewayService(IConcertService _concertService, IAuthService _authService, IPerfomersService _perfomersService, IVenuesService _venuesService) { concertService = _concertService; perfomersService = _perfomersService; venuesService = _venuesService; authService = _authService; }
public TicketingApplication(ITicketCommandFactory ticketCommandFactory, IConcertService concertService, IApplicationServiceBus applicationServiceBus) { ApplicationServiceBus = applicationServiceBus; var inputBufferSize = 2 << 10; var claimStrategy = new SingleThreadedClaimStrategy(inputBufferSize); var waitStrategy = new SleepingWaitStrategy(); var commandHandlers = new CommandHandlerCollection(); RegisterCommandHandlers(concertService, commandHandlers); inputDisruptor = new Disruptor<CommandMessage>(() => new CommandMessage(), claimStrategy, waitStrategy, TaskScheduler.Default); inputDisruptor.HandleEventsWith(new CommandMessageHandler(commandHandlers)); // Publishers and translators to input buffer commandMessageTranslator = new CommandMessageTranslator(ticketCommandFactory, ApplicationServiceBus); }
private static void RegisterCommandHandlers(IConcertService concertService, CommandHandlerCollection commandHandlers) { var factory = new SimpleEventHandlerFactory(); commandHandlers.AddHandler(typeof (PurchaseTicketCommand), factory.CreateEventHandler(concertService, (IConcertService service, IPurchaseTicketCommand cmd, long seq, bool endOfBatch) => { concertService.PurchaseTicket(/*IPurchaseTicketCommand data*/); })); commandHandlers.AddHandler(typeof(CancelTicketCommand), factory.CreateEventHandler(concertService, (IConcertService service, ICancelTicketCommand cmd, long seq, bool endOfBatch) => { concertService.CancelTicket(/*ICancelTicketCommand data*/); })); commandHandlers.AddHandler(typeof(CreateConcertCommand), factory.CreateEventHandler(concertService, (IConcertService service, ICreateConcertCommand cmd, long seq, bool endOfBatch) => { concertService.CreateConcert(/*ICreateConcertCommand data*/); })); }
public ConcertsController(IConcertService concertService, IMapper mapper) { _concertService = concertService; _mapper = mapper; }
public ConcertController(IConcertService concertService) { this.concertService = concertService; }
public HomeController(IConcertService concertService, IUserService userService) { this.concertService = concertService; this.userService = userService; }
public HomeController(IUserService service, IConcertService concService, IBandService bandService) { UserService = service; ConcertService = concService; BandService = bandService; }
public ConcertController(IConcertService service) { _concertService = service; }
public ConcertsController(IConcertService concertService, ITweetService tweetService) { _concertService = concertService; _tweetService = tweetService; }
/// <summary> /// Конструктор /// </summary> /// <param name="eventService"></param> /// <param name="concertService"></param> public ConcertController(IEventService eventService, IConcertService concertService) { _eventService = eventService; _concertService = concertService; }