void INotifyRegistry.RegisterSender(string senderName, ISink senderSink) { lock (channels) { channels[senderName] = new SenderChannel(this, senderName, null, senderSink); } }
internal SenderBuilder(int bookmakerId = 0, int limitId = 0, string currency = null, SenderChannel channel = SenderChannel.Internet) { _bookmakerId = bookmakerId; _limitId = limitId; _currency = currency; _channel = channel; }
public Sender(EndCustomer customer, SenderChannel channel, string currency, int limitId, int bookmakerId, string shopId, string terminalId) { EndCustomer = customer; Channel = channel; Currency = currency; LimitId = limitId; BookmakerId = bookmakerId; ShopId = shopId; TerminalId = terminalId; }
/// <summary> /// Initializes a new instance of the <see cref="SenderBuilder"/> class /// </summary> /// <param name="config">The <see cref="ISdkConfiguration"/> providing default builder values</param> internal SenderBuilder(ISdkConfiguration config) { Guard.Argument(config, nameof(config)).NotNull(); _bookmakerId = config.BookmakerId; _limitId = config.LimitId; _currency = config.Currency; if (config.Channel != null) { _channel = (SenderChannel)config.Channel; } }
public Sender(int bookmakerId, string currency, string terminalId, SenderChannel channel, string shopId, IEndCustomer endCustomer, int limitId) { Guard.Argument(bookmakerId, nameof(bookmakerId)).Positive(); Guard.Argument(currency, nameof(currency)).NotNull().NotEmpty(); Guard.Argument(currency.Length, nameof(currency.Length)).InRange(3, 4); Guard.Argument(terminalId, nameof(terminalId)).Require(string.IsNullOrEmpty(terminalId) || TicketHelper.ValidateUserId(terminalId)); Guard.Argument(shopId, nameof(shopId)).Require(string.IsNullOrEmpty(shopId) || TicketHelper.ValidateUserId(shopId)); Guard.Argument(limitId, nameof(limitId)).Positive(); BookmakerId = bookmakerId; Currency = currency.Length == 3 ? currency.ToUpper() : currency; TerminalId = terminalId; Channel = channel; ShopId = shopId; EndCustomer = endCustomer; LimitId = limitId; ValidateSenderData(); }
public ISdkConfigurationBuilder SetSenderChannel(SenderChannel channel) { _senderChannel = channel; return(this); }
/// <summary> /// Sets the senders communication channel /// </summary> /// <param name="channel">The channel</param> /// <returns>Returns a <see cref="ISenderBuilder" /></returns> public ISenderBuilder SetSenderChannel(SenderChannel channel) { _channel = channel; return(this); }