internal TicketCashoutSender(ITicketMapper <ITicketCashout, TicketCashoutDTO> ticketMapper, IRabbitMqPublisherChannel publisherChannel, ConcurrentDictionary <string, TicketCacheItem> ticketCache, IMtsChannelSettings mtsChannelSettings, IRabbitMqChannelSettings rabbitMqChannelSettings) : base(publisherChannel, ticketCache, mtsChannelSettings, rabbitMqChannelSettings) { Guard.Argument(ticketMapper, nameof(ticketMapper)).NotNull(); _ticketMapper = ticketMapper; }
/// <summary> /// Initializes a new instance of the <see cref="TicketSenderBase"/> class /// </summary> /// <param name="publisherChannel">The publisher channel</param> /// <param name="ticketCache">The ticket cache</param> /// <param name="mtsChannelSettings">The MTS channel settings</param> /// <param name="rabbitMqChannelSettings">Rabbit channel settings</param> internal TicketSenderBase(IRabbitMqPublisherChannel publisherChannel, ConcurrentDictionary <string, TicketCacheItem> ticketCache, IMtsChannelSettings mtsChannelSettings, IRabbitMqChannelSettings rabbitMqChannelSettings) { Guard.Argument(publisherChannel, nameof(publisherChannel)).NotNull(); Guard.Argument(ticketCache, nameof(ticketCache)).NotNull(); Guard.Argument(mtsChannelSettings, nameof(mtsChannelSettings)).NotNull(); Guard.Argument(rabbitMqChannelSettings, nameof(rabbitMqChannelSettings)).NotNull(); _publisherChannel = publisherChannel; _ticketCache = ticketCache; _mtsChannelSettings = mtsChannelSettings; _rabbitMqChannelSettings = rabbitMqChannelSettings; _publisherChannel.MqMessagePublishFailed += PublisherChannelOnMqMessagePublishFailed; _timer = new SdkTimer(new TimeSpan(0, 0, 0, 0, GetCacheTimeout(null)), new TimeSpan(0, 0, 10)); _timer.Elapsed += OnTimerElapsed; _timer.FireOnce(new TimeSpan(0, 0, 0, 0, GetCacheTimeout(null))); }
public RabbitMqPublisherBus(IRabbitMqPublisherChannel channel) { _channel = channel; }