public ShowReservationsWatcherPool(IProvideReservedSeats reservationProvider, TimeSpan?pullPeriod = null) { _reservationProvider = reservationProvider; if (pullPeriod == null) { pullPeriod = PullPeriodDefaultValue; } _pullPeriod = pullPeriod.Value; }
public ShowsController(IProvideAuditoriumSeating auditoriumSeating, IProvideReservedSeats reservedSeats, ISuggestSeats seatSuggestionsProvider, IProvidePrices pricingProvider, IHubContext <ReservationsHub> hubContext, IPublishMessages publisher, IHostClientProxies clientProxyPool) { _auditoriumSeating = auditoriumSeating; _reservedSeats = reservedSeats; _seatSuggestionsProvider = seatSuggestionsProvider; _pricingProvider = pricingProvider; _hubContext = hubContext; _publisher = publisher; _clientProxyPool = clientProxyPool; }
/// <summary> /// Instantiate a "seats reserved" watcher for this show. It will notify every registered client from any new /// reservation available for this show. /// </summary> /// <param name="showId">The id of the show to watch reservations for.</param> /// <param name="reservationProvider">The provider for the current reservation list for this show.</param> /// <param name="pullPeriod">The Timespan of the interval between 2 pull from the provider.</param> /// <param name="timer">A timer instance (typically for providing a stub timer) or null.</param> public ShowReservationsWatcher(string showId, IProvideReservedSeats reservationProvider, TimeSpan pullPeriod, ITimer timer = null) { if (timer == null) { timer = new Timer(); } _showId = showId; _reservationProvider = reservationProvider; _pullPeriod = pullPeriod; _timer = timer; }