public SlaveClientCollection([NotNull] ISendQueue <TPeer> sender, [NotNull] ISession session, [NotNull] EventQueue events, [NotNull] Rooms localRooms, [NotNull] string playerName, CodecSettings codecSettings) { if (session == null) { throw new ArgumentNullException("session"); } if (sender == null) { throw new ArgumentNullException("sender"); } if (events == null) { throw new ArgumentNullException("events"); } if (localRooms == null) { throw new ArgumentNullException("localRooms"); } if (playerName == null) { throw new ArgumentNullException("playerName"); } _session = session; _sender = sender; _events = events; _localRooms = localRooms; _playerName = playerName; _codecSettings = codecSettings; }
public VoiceSender( [NotNull] ISendQueue <TPeer> sender, [NotNull] ISession session, [NotNull] IClientCollection <TPeer?> peers, [NotNull] EventQueue events, [NotNull] PlayerChannels playerChannels, [NotNull] RoomChannels roomChannels) { if (sender == null) { throw new ArgumentNullException("sender"); } if (session == null) { throw new ArgumentNullException("session"); } if (peers == null) { throw new ArgumentNullException("peers"); } if (events == null) { throw new ArgumentNullException("events"); } if (playerChannels == null) { throw new ArgumentNullException("playerChannels"); } if (roomChannels == null) { throw new ArgumentNullException("roomChannels"); } _sender = sender; _session = session; _peers = peers; _playerChannels = playerChannels; _roomChannels = roomChannels; _events = events; //Subscribe to future channel open and close events for both channel types _playerChannels.OpenedChannel += OpenPlayerChannel; _playerChannels.ClosedChannel += ClosePlayerChannel; _roomChannels.OpenedChannel += OpenRoomChannel; _roomChannels.ClosedChannel += CloseRoomChannel; //There may already be some channels which were created before we created those events, run through them all now so we're up to date foreach (var playerChannel in playerChannels) { OpenPlayerChannel(playerChannel.Value.TargetId, playerChannel.Value.Properties); } foreach (var roomChannel in roomChannels) { OpenRoomChannel(roomChannel.Value.TargetId, roomChannel.Value.Properties); } //We need to watch for player join/leave events to properly handle player channel management _events.PlayerJoined += OnPlayerJoined; _events.PlayerLeft += OnPlayerLeft; }
/// <summary> /// Initializes a new instance of the <see cref="SendBatchMessagesActivity"/> class. /// </summary> /// <param name="sendQueue">Send queue service.</param> /// <param name="notificationDataRepository">Notification data repository.</param> public SendBatchMessagesActivity( ISendQueue sendQueue, INotificationDataRepository notificationDataRepository) { this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue)); this.notificationDataRepository = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository)); }
/// <summary> /// Initializes a new instance of the <see cref="SendFunction"/> class. /// </summary> /// <param name="options">Send function options.</param> /// <param name="notificationService">The service to precheck and determine if the queue message should be processed.</param> /// <param name="messageService">Message service.</param> /// <param name="notificationRepo">Notification repository.</param> /// <param name="sendQueue">The send queue.</param> /// <param name="localizer">Localization service.</param> /// <param name="sentNotificationUpdateDataRepository">SentNotificationUpdateDataRepository service.</param> /// <param name="sentUpdateandDeleteNotificationDataRepository">SentUpdateandDeleteNotificationDataRepository service.</param> public SendFunction( IOptions <SendFunctionOptions> options, INotificationService notificationService, IMessageService messageService, ISendingNotificationDataRepository notificationRepo, ISendQueue sendQueue, IStringLocalizer <Strings> localizer, ISentUpdateDataRepository sentNotificationUpdateDataRepository, ISentUpdateandDeleteNotificationDataRepository sentUpdateandDeleteNotificationDataRepository) { if (options is null) { throw new ArgumentNullException(nameof(options)); } this.maxNumberOfAttempts = options.Value.MaxNumberOfAttempts; this.sendRetryDelayNumberOfSeconds = options.Value.SendRetryDelayNumberOfSeconds; this.notificationService = notificationService ?? throw new ArgumentNullException(nameof(notificationService)); this.messageService = messageService ?? throw new ArgumentNullException(nameof(messageService)); this.notificationRepo = notificationRepo ?? throw new ArgumentNullException(nameof(notificationRepo)); this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue)); this.localizer = localizer ?? throw new ArgumentNullException(nameof(localizer)); this.sentNotificationUpdateDataRepository = sentNotificationUpdateDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationUpdateDataRepository)); this.sentUpdateandDeleteNotificationDataRepository = sentUpdateandDeleteNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentUpdateandDeleteNotificationDataRepository)); }
protected override void execute() { _sendQueue = Context.Get<ISendQueue>(); if(Context.LocalVars != null && Context.DebugLevel > 0) Context.Get<IScriptLog>().Log(Context.Name, "send {0}".ToFormat(Token.Value), Context.LineNumber); _sendQueue.Add(Token.Value); TaskSource.TrySetResult(new CompletionEventArgs()); }
/// <summary> /// Initializes a new instance of the <see cref="SentNotificationsController"/> class. /// </summary> /// <param name="channelDataRepository">Channel data repository service that deals with the table storage in azure.</param> /// <param name="notificationDataRepository">Notification data repository service that deals with the table storage in azure.</param> /// <param name="sentNotificationDataRepository">Sent notification data repository.</param> /// <param name="sentNotificationUpdateDataRepository">Sent update notification data repository.</param> /// <param name="sentNotificationDataRepstry">Sent notification data repository to Get Likes.</param> /// <param name="teamDataRepository">Team data repository instance.</param> /// <param name="distributionListDataRepository">DistributionList data repository instance.</param> /// <param name="prepareToSendQueue">The service bus queue for preparing to send notifications.</param> /// <param name="sendQueue">The service bus queue for the send queue.</param> /// <param name="dataQueue">The service bus queue for the data queue.</param> /// <param name="dataQueueMessageOptions">The options for the data queue messages.</param> /// <param name="groupsService">The groups service.</param> /// <param name="memberService">The meber info service.</param> /// <param name="reactionService">The reaction of message service.</param> /// <param name="exportDataRepository">The Export data repository instance.</param> /// <param name="appCatalogService">App catalog service.</param> /// <param name="appSettingsService">App settings service.</param> /// <param name="userAppOptions">User app options.</param> /// <param name="loggerFactory">The logger factory.</param> /// <param name="configuration">The Configuration.</param> /// <param name="botOptions">bot options.</param> public SentNotificationsController( IChannelDataRepository channelDataRepository, INotificationDataRepository notificationDataRepository, ISentUpdateandDeleteNotificationDataRepository sentNotificationDataRepository, ISentUpdateDataRepository sentNotificationUpdateDataRepository, ISentNotificationDataRepository sentNotificationDataRepstry, ITeamDataRepository teamDataRepository, IDistributionListDataRepository distributionListDataRepository, IPrepareToSendQueue prepareToSendQueue, ISendQueue sendQueue, IDataQueue dataQueue, IOptions <DataQueueMessageOptions> dataQueueMessageOptions, IGroupsService groupsService, IMessageReactionService reactionService, ITeamMembersService memberService, IExportDataRepository exportDataRepository, IAppCatalogService appCatalogService, IAppSettingsService appSettingsService, IOptions <UserAppOptions> userAppOptions, ILoggerFactory loggerFactory, IConfiguration configuration, IOptions <BotOptions> botOptions) { if (dataQueueMessageOptions is null) { throw new ArgumentNullException(nameof(dataQueueMessageOptions)); } var options = botOptions ?? throw new ArgumentNullException(nameof(botOptions)); this.channelDataRepository = channelDataRepository ?? throw new ArgumentNullException(nameof(channelDataRepository)); this.notificationDataRepository = notificationDataRepository ?? throw new ArgumentNullException(nameof(notificationDataRepository)); this.sentNotificationDataRepository = sentNotificationDataRepository ?? throw new ArgumentNullException(nameof(sentNotificationDataRepository)); this.sentNotificationUpdateDataRepository = sentNotificationUpdateDataRepository ?? throw new ArgumentException(nameof(sentNotificationUpdateDataRepository)); this.sentNotificationDataRepstry = sentNotificationDataRepstry ?? throw new ArgumentNullException(nameof(sentNotificationDataRepstry)); this.teamDataRepository = teamDataRepository ?? throw new ArgumentNullException(nameof(teamDataRepository)); this.distributionListDataRepository = distributionListDataRepository ?? throw new ArgumentNullException(nameof(distributionListDataRepository)); this.prepareToSendQueue = prepareToSendQueue ?? throw new ArgumentNullException(nameof(prepareToSendQueue)); this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue)); this.dataQueue = dataQueue ?? throw new ArgumentNullException(nameof(dataQueue)); this.forceCompleteMessageDelayInSeconds = dataQueueMessageOptions.Value.ForceCompleteMessageDelayInSeconds; this.groupsService = groupsService ?? throw new ArgumentNullException(nameof(groupsService)); this.reactionService = reactionService ?? throw new ArgumentNullException(nameof(reactionService)); this.memberService = memberService ?? throw new ArgumentNullException(nameof(memberService)); this.exportDataRepository = exportDataRepository ?? throw new ArgumentNullException(nameof(exportDataRepository)); this.appCatalogService = appCatalogService ?? throw new ArgumentNullException(nameof(appCatalogService)); this.appSettingsService = appSettingsService ?? throw new ArgumentNullException(nameof(appSettingsService)); this.userAppOptions = userAppOptions?.Value ?? throw new ArgumentNullException(nameof(userAppOptions)); this.logger = loggerFactory?.CreateLogger <SentNotificationsController>() ?? throw new ArgumentNullException(nameof(loggerFactory)); this.account = string.Empty; this.configuration = configuration; }
/// <summary> /// Initializes a new instance of the <see cref="DraftNotificationPreviewService"/> class. /// </summary> /// <param name="botOptions">The bot options.</param> /// <param name="adaptiveCardCreator">Adaptive card creator service.</param> /// <param name="companyCommunicatorBotAdapter">Bot framework http adapter instance.</param> /// <param name="templateDataRepository">The template data repository.</param> /// <param name="sendQueue">The service bus queue for the data queue.</param> public DraftNotificationPreviewService( IOptions <BotOptions> botOptions, AdaptiveCardCreator adaptiveCardCreator, CompanyCommunicatorBotAdapter companyCommunicatorBotAdapter, ITemplateDataRepository templateDataRepository, ISendQueue sendQueue) { var options = botOptions ?? throw new ArgumentNullException(nameof(botOptions)); this.botAppId = options.Value.AuthorAppId; if (string.IsNullOrEmpty(this.botAppId)) { throw new ApplicationException("AuthorAppId setting is missing in the configuration."); } this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue)); this.adaptiveCardCreator = adaptiveCardCreator ?? throw new ArgumentNullException(nameof(adaptiveCardCreator)); this.templateDataRepository = templateDataRepository ?? throw new ArgumentNullException(nameof(templateDataRepository)); this.companyCommunicatorBotAdapter = companyCommunicatorBotAdapter ?? throw new ArgumentNullException(nameof(companyCommunicatorBotAdapter)); }
public ConnectionNegotiator([NotNull] ISendQueue <TPeer> sender, string playerName, [NotNull] CodecSettings codecSettings) { _sender = sender; _playerName = playerName; _codecSettings = codecSettings; }
/// <summary> /// Initializes a new instance of the <see cref="SendBatchMessagesActivity"/> class. /// </summary> /// <param name="sendQueue">Send queue service.</param> public SendBatchMessagesActivity( ISendQueue sendQueue) { this.sendQueue = sendQueue ?? throw new ArgumentNullException(nameof(sendQueue)); }
public ConnectionNegotiator([NotNull] ISendQueue <TPeer> sender, string playerName) { _sender = sender; _playerName = playerName; }
public TextSender(ISendQueue <TPeer> sender, ISession session, IClientCollection <TPeer?> peers) { _session = session; _sender = sender; _peers = peers; }
Example(IReceiveQueue receiveQueue, ISendQueue sendQueue) { }
public ArtistsController(ApplicationDbContext context, IEmailService emailService, ISendQueue sendqueue) { this.sendqueue = sendqueue; this.emailService = emailService; this.context = context; }
public QueueController(ISendQueue sendQueue) { this.sendQueue = sendQueue; }