public HandleCommandService( ICommandsService commandsService, IAuthorizationService spotifyAuthorizationService, IAuthorizationTokenRepository authorizationTokenRepository, ISendMessageService sendMessageService, ISpotifyLinkHelper spotifyLinkHelper, ISyncTracksService trackService, IPlaylistRepository playlistRepository, IKeyboardService keyboardService, IChatRepository chatRepository, IUserService userService, IUserRepository userRepository, ISpotifyClientFactory spotifyClientFactory, ISpotifyClientService spotifyClientService) : base(commandsService, userRepository, sendMessageService, spotifyLinkHelper) { _commandsService = commandsService; _spotifyAuthorizationService = spotifyAuthorizationService; _authorizationTokenRepository = authorizationTokenRepository; _sendMessageService = sendMessageService; _spotifyLinkHelper = spotifyLinkHelper; _syncTracksService = trackService; _playlistRepository = playlistRepository; _keyboardService = keyboardService; _chatRepository = chatRepository; _userService = userService; _spotifyClientFactory = spotifyClientFactory; _spotifyClientService = spotifyClientService; }
public ACCommands(IACParametersAuthPKCE parameters) { _parameters = parameters; _service = new CommandsService(parameters); switch (parameters.ClientType) { case ClientType.Tcp: _tcpClient = new TcpClientAC(_parameters.BotAccessToken); _tcpClient.ConnectionEvent += OnTcpConnectionEvent; _tcpClient.ErrorEvent += OnTcpErrorEvent; _tcpClient.MessageEvent += OnMessageEvent; break; case ClientType.Websocket: _wsClient = new WSClientAC(_parameters.BotAccessToken); _wsClient.ConnectionEvent += OnWSConnectionEvent; _wsClient.ErrorEvent += OnWSErrorEvent; _wsClient.MessageEvent += OnMessageEvent; break; default: throw new Exception("ClientType is not accepted"); } }
/// <summary> /// /// </summary> protected override void InitializeServiceComponent() { base.InitializeServiceComponent(); ICommandsService commansSrv = this.GetServiceForThisTypeKey <ICommandsService>(); this.EnabledDeciders.Add(commansSrv.GetCommandEnabledDecider <ExportExcelCommandEnabledDecider>()); }
public BaseCommandsService( ICommandsService commandsService, IUserRepository userRepository, ISendMessageService sendMessageService, ISpotifyLinkHelper spotifyLinkHelper) { _commandsService = commandsService; _userRepository = userRepository; _sendMessageService = sendMessageService; _spotifyLinkHelper = spotifyLinkHelper; }
public void SetUp() { _gitClientService = MockRepository.GenerateMock <IGitClientService>(); _pullRequestDiffViewModel = MockRepository.GenerateMock <IPullRequestDiffViewModel>(); _gitService = MockRepository.GenerateMock <IGitService>(); _userInfoService = MockRepository.GenerateMock <IUserInformationService>(); _messageBoxService = MockRepository.GenerateMock <IMessageBoxService>(); _eventAggregatorService = new EventAggregatorService(); _commandsService = MockRepository.GenerateMock <ICommandsService>(); _vsTools = MockRepository.GenerateMock <IVsTools>(); }
public void SetUp() { _gitClientService = MockRepository.GenerateMock <IGitClientService>(); _gitService = MockRepository.GenerateMock <IGitService>(); _userInfoService = MockRepository.GenerateMock <IUserInformationService>(); _messageBoxService = MockRepository.GenerateMock <IMessageBoxService>(); _treeStructureGenerator = MockRepository.GenerateMock <ITreeStructureGenerator>(); _eventAggregatorService = new EventAggregatorService(); _commandsService = MockRepository.GenerateMock <ICommandsService>(); _vsTools = MockRepository.GenerateMock <IVsTools>(); }
public void SetUp() { _gitClientService = MockRepository.GenerateMock <IGitClientService>(); _gitService = MockRepository.GenerateMock <IGitService>(); _pageNavigationService = MockRepository.GenerateMock <IPageNavigationService <IPullRequestsWindow> >(); _eventAggregator = new EventAggregatorService(); _treeStructureGenerator = MockRepository.GenerateMock <ITreeStructureGenerator>(); _commandsService = MockRepository.GenerateMock <ICommandsService>(); _sut = CreateSut(); }
public HandleInlineQueryCommandService( ICommandsService commandsService, IUserRepository userRepository, ISendMessageService sendMessageService, IVoteRepository voteRepository, ISpotifyLinkHelper spotifyLinkHelper) : base(commandsService, userRepository, sendMessageService, spotifyLinkHelper) { _commandsService = commandsService; _userRepository = userRepository; _sendMessageService = sendMessageService; _voteRepository = voteRepository; }
public void SetUp() { _gitClientService = MockRepository.GenerateMock <IGitClientService>(); _gitService = MockRepository.GenerateMock <IGitService>(); _pageNavigationService = MockRepository.GenerateMock <IPageNavigationService <IPullRequestsWindow> >(); _eventAggregator = new EventAggregatorService(); _treeStructureGenerator = MockRepository.GenerateMock <ITreeStructureGenerator>(); _commandsService = MockRepository.GenerateMock <ICommandsService>(); _pullRequestDiffViewModel = MockRepository.GenerateMock <IPullRequestDiffViewModel>(); _pullRequestDiffViewModel.Stub(x => x.ThrowableCommands).Return(new List <ReactiveCommand>()); _sut = CreateSut(); }
public Update( IHandleMessageService handleMessageService, IHandleCallbackQueryService handleCallbackQueryService, IHandleInlineQueryService handleInlineQueryService, ICommandsService commandsService, IUpdateDtoService updateDtoService, IOptions <Library.Options.SentryOptions> sentryOptions) { _handleMessageService = handleMessageService; _handleCallbackQueryService = handleCallbackQueryService; _handleInlineQueryService = handleInlineQueryService; _commandsService = commandsService; _updateDtoService = updateDtoService; _sentryOptions = sentryOptions.Value; }
public TelegramBotService( ITelegramBotClient telegramBotClient, IGameRepository gameRepository, ICommandsService commandsService, IAutoReplyService autoReplyService) { _telegramBotClient = telegramBotClient; _gameRepository = gameRepository; _commandsService = commandsService; _autoReplyService = autoReplyService; _telegramBotClient.OnMessage += Bot_OnMessage; _telegramBotClient.OnReceiveError += Client_OnReceiveError; _telegramBotClient.OnReceiveGeneralError += Client_OnReceiveGeneralError; }
public BookingsController(ICommandsService commands, IQueriesService queries) { _queries = queries ?? throw new ArgumentNullException(nameof(queries)); _commands = commands ?? throw new ArgumentNullException(nameof(commands)); AllBookings = _queries.GetAllBookings(); foreach (Booking b in AllBookings) { Flight f = _queries.GetFlightById(b.FlightNo); VMAllBookings.Add(new VMListBookings { FlightNo = b.FlightNo, ArrivalCity = f.ArrivalCity, BookingDate = b.BookingDate, DepartureCity = f.DepartureCity, EndTime = f.EndTime, BookingId = b.BookingId, PassengerName = b.PassengerId.ToString(), StartTime = f.StartTime }); } }
private void BrowseViewLoad(object sender, EventArgs e) { ICommandsService cmdSer = this.GetServiceForThisTypeKey <ICommandsService>(); if (cmdSer.Commands.Contains("DisconfirmCommandForBrowseWindow")) { CommandBase cmdConfirm = cmdSer.Commands["DisconfirmCommandForBrowseWindow"] as CommandBase; //审核按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmBrowseEnabledDecider>()); } if (cmdSer.Commands.Contains("DocumentDataDeleteCommand")) { CommandBase cmdConfirm = cmdSer.Commands["DocumentDataDeleteCommand"] as CommandBase; //删除按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmBrowseEnabledDecider>()); //^_^ 20171010 MODI BY HEHF FOR CBBM11709199 OLD:ConfirmEditorEnabledDecider } if (cmdSer.Commands.Contains("ModifyCommand")) { CommandBase cmdConfirm = cmdSer.Commands["ModifyCommand"] as CommandBase; //修改按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmBrowseEnabledDecider>()); //^_^ 20171010 MODI BY HEHF FOR CBBM11709199 OLD:ConfirmEditorEnabledDecider } }
private void EditorLoad(object sender, EventArgs e) { ICommandsService cmdSer = this.GetServiceForThisTypeKey <ICommandsService>(); if (cmdSer.Commands.Contains("Disconfirm")) { CommandBase cmdConfirm = cmdSer.Commands["Disconfirm"] as CommandBase; //审核按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmEditorEnabledDecider>()); } if (cmdSer.Commands.Contains("DocumentDataDeleteCommand")) { CommandBase cmdConfirm = cmdSer.Commands["DocumentDataDeleteCommand"] as CommandBase; //删除按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmEditorEnabledDecider>()); } if (cmdSer.Commands.Contains("ModifyCommand")) { CommandBase cmdConfirm = cmdSer.Commands["ModifyCommand"] as CommandBase; //修改按钮 cmdConfirm.EnabledDeciders.Add(cmdSer.GetCommandEnabledDecider <ConfirmEditorEnabledDecider>()); } }
public PullRequestNavigationItem( IYouTrackClientService youTrackClientService, IGitService gitService, IEventAggregatorService eventAggregator, IUserInformationService userInformationService, ICommandsService commandService ) : base(null) { _youTrackClientService = youTrackClientService; _gitService = gitService; _eventAggregator = eventAggregator; _userInformationService = userInformationService; _commandService = commandService; Text = Resources.PullRequestNavigationItemTitle; Image = Resources.PullRequest; IsVisible = ShouldBeVisible(_userInformationService.ConnectionData); var connectionObs = _eventAggregator.GetEvent <ConnectionChangedEvent>(); var repoObs = _eventAggregator.GetEvent <ActiveRepositoryChangedEvent>(); _observable = connectionObs.Select(x => Unit.Default).Merge(repoObs.Select(x => Unit.Default)).Subscribe(_ => ValidateVisibility()); }
public CreateIssueViewModel( IYouTrackClientService youTrackClientService, IPageNavigationService <IYouTrackIssuesWindow> pageNavigationService, IEventAggregatorService eventAggregator, IUserInformationService userInfoService, ICommandsService commandsService, IDataNotifier dataNotifier, IPullRequestDiffViewModel pullRequestDiffViewModel ) { _youTrackClientService = youTrackClientService; _pageNavigationService = pageNavigationService; _eventAggregator = eventAggregator; _dataNotifier = dataNotifier; PullRequestDiffViewModel = pullRequestDiffViewModel; _userInfoService = userInfoService; SelectedReviewers = new ReactiveList <GitUser>(); }
public RocketChatApi( IChatService chatService, IUsersService usersService, IGroupsService groupsService, IChannelsService channelsService, IAuthenticationService authenticationService, IRoomService roomService, IAssetsService assetsService, IAutoTranslateService autoTranslateService, ICommandsService commandsService, IEmojisService emojisService) { Chat = chatService; Users = usersService; Groups = groupsService; Channels = channelsService; Authentication = authenticationService; RoomService = roomService; AssetsService = assetsService; AutoTranslateService = autoTranslateService; CommandsService = commandsService; EmojisService = emojisService; }
public CentralHub(ICommandsService commandsService) { _commandsService = commandsService; }
public ShikiExecuteOnStartupService(ICommandsService commandsService) { this._commandsService = commandsService; }
public AddCommand(IConsoleService console, ICommandsService commandsService) { _console = console; _commandsService = commandsService; }
public AniListExecuteOnStartupService(ICommandsService commandsService) { this._commandsService = commandsService; }
public CleanupCommand(IConsoleService console, ICommandsService commandsService) { _console = console; _commandsService = commandsService; }
public CommandController(ICallsService callsService, ICommandsService commandsService) { _callsService = callsService; _commandsService = commandsService; }
public UpdateListeningController(ICommandsService commandsService) =>
public BotController(ICommandsService telegramService) { _telegramService = telegramService; }
public LogController(ICommandsService service) : base(service) { }
/// <summary> /// Operations to perform against the security sub-system /// </summary> public CommandsController(ICommandsService commandsService) { _commandsService = commandsService; }
public RemoveCommand(IConsoleService console, ICommandsService commandsService) { _console = console; _commandsService = commandsService; }