public MessageHandlingService(
     IUserTrackerService userTracker,
     IQueueService <Chat> chatQueue)
 {
     _userTracker = userTracker;
     _chatQueue   = chatQueue;
 }
Пример #2
0
 public DiscordBot(IServiceCollection services)
 {
     ConfigureServices(services);
     ServiceProvider  = services.BuildServiceProvider();
     BotConfiguration = ServiceProvider.GetService <IBotConfiguration>();
     UserTracker      = ServiceProvider.GetService <IUserTrackerService>();
     Client           = ServiceProvider.GetService <IDiscordClient>() as DiscordSocketClient;
     Logger           = ServiceProvider.GetService <ILogger>();
     Commands         = ServiceProvider.GetService <CommandService>();
     CardStackManager = ServiceProvider.GetService <ICardStackManager>();
 }
        public PresenceHubLifetimeManager(IUserTrackerService userTracker, IServiceScopeFactory serviceScopeFactory,
                                          ILoggerFactory loggerFactory, IServiceProvider serviceProvider)
        {
            _userTracker = userTracker;

            _userTracker.UserJoined += _userTracker_UserJoined;
            _userTracker.UserLeft   += _userTracker_UserUserLeft;

            _serviceScopeFactory = serviceScopeFactory;
            _serviceProvider     = serviceProvider;
            _logger = loggerFactory.CreateLogger <PresenceHubLifetimeManager <THub, THubLifetimeManager> >();
            _wrappedHubLifetimeManager = serviceProvider.GetRequiredService <THubLifetimeManager>();
        }
Пример #4
0
 public Server(
     INetworkCredentialsPatternValidationService patternValidationService,
     IServerMessageHandlingService messageHandlingService,
     IUserTrackerService userTracker,
     IQueueService <Chat> _chatQueue)
 {
     _patternValidationService = patternValidationService;
     _messageHandlingService   = messageHandlingService;
     _userTracker    = userTracker;
     this._chatQueue = _chatQueue;
     _lock           = new object();
     _messageLock    = new object();
     _exitListening  = false;
 }
Пример #5
0
 public UserCommands(IDiscordClient discordClient, IDiscordBot discordBot, IServiceProvider serviceProvider, IBotConfiguration botConfiguration, IUserTrackerService userTracker)
     : base(discordClient, discordBot, serviceProvider, botConfiguration)
 {
     _userTracker = userTracker;
 }
 public DefaultPresenceHublifetimeManager(IUserTrackerService userTracker, IServiceScopeFactory serviceScopeFactory,
                                          ILoggerFactory loggerFactory, IServiceProvider serviceProvider)
     : base(userTracker, serviceScopeFactory, loggerFactory, serviceProvider)
 {
 }
Пример #7
0
 public ChatHub(IUserTrackerService userTracker)
     : base(userTracker)
 {
     _userTracker = userTracker ?? throw new ArgumentNullException(nameof(userTracker));
 }
Пример #8
0
 public HubWithPresence(IUserTrackerService userTracker)
 {
     _userTracker = userTracker;
 }