public RequestReplyMessageHandler(
     IUserChatHubSession userChatHubSession,
     IChatSession chatSession,
     ITelegramBotClient telegramBotClient)
 {
     _userChatHubSession = userChatHubSession;
     _chatSession        = chatSession;
     _telegramBotClient  = telegramBotClient;
 }
        public ChatHubAdministratorMessage(
            string text,
            DateTime sentAt,
            IChatHubHistory history,
            Func <IServiceProvider> serviceProviderFactory)
            : base(text, sentAt, history)
        {
            var provider = serviceProviderFactory();


            _hubContext         = provider.GetRequiredService <IHubContext <ChatHub> >();
            _userChatHubSession = provider.GetRequiredService <IUserChatHubSession>();
            _uowFactory         = provider.GetRequiredService <Func <UnitOfWork> >();
        }
Beispiel #3
0
        public ChatSession(
            Func <UnitOfWork> uowFactory,
            IOptions <BotSettings> botSettings,
            IUserChatHubSession userChatHubSession,
            ITelegramBotClient telegramBotClient)
        {
            _password = botSettings.Value?.Password ??
                        throw new ArgumentNullException(nameof(botSettings.Value.Password));

            _administrators     = new List <ChatAdministrator>();
            _uowFactory         = uowFactory;
            _userChatHubSession = userChatHubSession;
            _telegramBotClient  = telegramBotClient;
        }
 public HomeController(IUserChatHubSession userChatHubSession)
 {
     _userChatHubSession = userChatHubSession;
 }
Beispiel #5
0
 public ChatHub(IUserChatHubSession userChatHubSession)
 {
     _userChatHubSession = userChatHubSession;
 }