Exemplo n.º 1
0
 public ReplyHandler(TelemetryClient telemetryClient, ITelegramBotClient bot, IDictionary <long, ITelegramBotClient> bots, RaidBattlesContext db)
 {
     myTelemetryClient = telemetryClient;
     myBot             = bot;
     myBots            = bots;
     myDB = db;
 }
 public InviteCallbackQueryHandler(RaidBattlesContext context, RaidService raidService, IUrlHelper urlHelper, ITelegramBotClient bot)
 {
     myContext     = context;
     myRaidService = raidService;
     myUrlHelper   = urlHelper;
     myBot         = bot;
 }
Exemplo n.º 3
0
 public TimeZoneNotifyHandler(TelemetryClient telemetryClient, ITelegramBotClient bot, RaidBattlesContext db, TimeZoneNotifyService timeZoneNotifyService)
 {
     myTelemetryClient = telemetryClient;
     myBot             = bot;
     myDB = db;
     myTimeZoneNotifyService = timeZoneNotifyService;
 }
Exemplo n.º 4
0
 public CancelCallbackQueryHandler(RaidBattlesContext context, RaidService raidService, IUrlHelper urlHelper, ChatInfo chatInfo)
 {
     myContext     = context;
     myRaidService = raidService;
     myUrlHelper   = urlHelper;
     myChatInfo    = chatInfo;
 }
Exemplo n.º 5
0
 public ChosenInlineResultHandler(RaidBattlesContext context, RaidService raidService, IUrlHelper urlHelper, PoGoToolsClient poGoToolsClient)
 {
     myContext         = context;
     myRaidService     = raidService;
     myUrlHelper       = urlHelper;
     myPoGoToolsClient = poGoToolsClient;
 }
Exemplo n.º 6
0
 public PollModeCallbackQueryHandler(RaidService raidService, IUrlHelper urlHelper, RaidBattlesContext db, ITelegramBotClient bot)
 {
     myRaidService = raidService;
     myUrlHelper   = urlHelper;
     myDb          = db;
     myBot         = bot;
 }
 public TextMessageHandler(ITelegramBotClient bot, IEnumerable <Lazy <Func <Message, IReplyBotCommandHandler>, BotCommandAttribute> > replyCommandHandlers,
                           IEnumerable <Lazy <Func <Message, IMessageEntityHandler <PollMessage, bool?> >, MessageEntityTypeAttribute> > messageEntityHandlers,
                           RaidBattlesContext db, IClock clock)
     : base(bot, messageEntityHandlers)
 {
     myReplyCommandHandlers = replyCommandHandlers;
     myDb = db;
 }
 public ShareInlineQueryHandler(RaidBattlesContext context, ITelegramBotClientEx bot, IUrlHelper urlHelper, IClock clock, RaidService raidService)
 {
     myContext     = context;
     myBot         = bot;
     myUrlHelper   = urlHelper;
     myClock       = clock;
     myRaidService = raidService;
 }
Exemplo n.º 9
0
 public FindCommandHandler(TelemetryClient telemetryClient, Message message, RaidBattlesContext context, ITelegramBotClient bot, IMemoryCache memoryCache)
     : base(message)
 {
     myTelemetryClient = telemetryClient;
     myContext         = context;
     myBot             = bot;
     myMemoryCache     = memoryCache;
 }
 public CancelCallbackQueryHandler(RaidBattlesContext context, RaidService raidService, IUrlHelper urlHelper, ChatInfo chatInfo, ITelegramBotClient bot)
 {
     myContext     = context;
     myRaidService = raidService;
     myUrlHelper   = urlHelper;
     myChatInfo    = chatInfo;
     myBot         = bot;
 }
 public InviteInlineQueryHandler(IUrlHelper urlHelper, RaidService raidService, ITelegramBotClientEx bot,
                                 RaidBattlesContext db)
 {
     myUrlHelper   = urlHelper;
     myRaidService = raidService;
     myBot         = bot;
     myDB          = db;
 }
Exemplo n.º 12
0
 public GymInlineQueryHandler(IUrlHelper urlHelper, IngressClient ingressClient, ITelegramBotClientEx bot, RaidBattlesContext db, RaidService raidService)
 {
     myUrlHelper     = urlHelper;
     myIngressClient = ingressClient;
     myBot           = bot;
     myDb            = db;
     myRaidService   = raidService;
 }
 public FriendshipCallbackQueryHandler(ITelegramBotClient bot, IDictionary <long, ITelegramBotClient> bots, RaidBattlesContext db,
                                       FriendshipService friendshipService)
 {
     myBot  = bot;
     myBots = bots;
     myDB   = db;
     myFriendshipService = friendshipService;
 }
Exemplo n.º 14
0
 public NotificationServiceWorker(RaidBattlesContext db, RaidService raidService, TelemetryClient telemetryClient, IOptions <BotConfiguration> options, IClock clock)
 {
     myDB                   = db;
     myRaidService          = raidService;
     myTelemetryClient      = telemetryClient;
     myClock                = clock;
     myNotificationLeadTime = options.Value.NotificationLeadTime;
 }
 public TimeZoneNotifyService(RaidBattlesContext db, IDateTimeZoneProvider dateTimeZoneProvider, DateTimeZone dateTimeZone, IClock clock, ITelegramBotClient bot)
 {
     myDB = db;
     myDateTimeZoneProvider = dateTimeZoneProvider;
     myDateTimeZone         = dateTimeZone;
     myClock = clock;
     myBot   = bot;
 }
Exemplo n.º 16
0
 public RaidService(RaidBattlesContext context, ITelegramBotClient bot, TelemetryClient telemetryClient, ChatInfo chatInfo, IMemoryCache memoryCache, IOptions <BotConfiguration> botOptions)
 {
     myContext         = context;
     myBot             = bot;
     myTelemetryClient = telemetryClient;
     myChatInfo        = chatInfo;
     myMemoryCache     = memoryCache;
     myLogChat         = botOptions.Value?.LogChatId is long chatId && chatId != default ? chatId : default(long?);
 }
Exemplo n.º 17
0
 public BotCommandMessageEntityHandler(RaidBattlesContext context, Message message, ITelegramBotClient telegramBotClient, RaidService raidService, IUrlHelper urlHelper, SetCallbackQueryHandler setCallbackQueryHandler)
 {
     myContext                 = context;
     myMessage                 = message;
     myTelegramBotClient       = telegramBotClient;
     myRaidService             = raidService;
     myUrlHelper               = urlHelper;
     mySetCallbackQueryHandler = setCallbackQueryHandler;
 }
Exemplo n.º 18
0
 public GeneralInlineQueryHandler(ITelegramBotClientEx bot, IUrlHelper urlHelper, ShareInlineQueryHandler shareInlineQueryHandler, RaidService raidService, IngressClient ingressClient, RaidBattlesContext db)
 {
     myBot       = bot;
     myUrlHelper = urlHelper;
     myShareInlineQueryHandler = shareInlineQueryHandler;
     myRaidService             = raidService;
     myIngressClient           = ingressClient;
     myDb = db;
 }
 public UserSettingsCommandHandler(RaidBattlesContext context, ITelegramBotClient bot, IMemoryCache cache, IClock clock, GeoCoder geoCoder, IDateTimeZoneProvider dateTimeZoneProvider)
 {
     myContext              = context;
     myBot                  = bot;
     myCache                = cache;
     myClock                = clock;
     myGeoCoder             = geoCoder;
     myDateTimeZoneProvider = dateTimeZoneProvider;
 }
 public VoteCallbackQueryHandler(RaidBattlesContext context, RaidService raidService, IUrlHelper urlHelper, IClock clock, IOptions <BotConfiguration> options)
 {
     myContext     = context;
     myRaidService = raidService;
     myUrlHelper   = urlHelper;
     myClock       = clock;
     myVoteTimeout = options.Value.VoteTimeout;
     myBlackList   = options.Value.BlackList ?? new HashSet <int>(0);
 }
 public TimeZoneQueryHandler(ITelegramBotClientEx bot, IDateTimeZoneProvider dateTimeZoneProvider, IClock clock, IUrlHelper urlHelper, RaidBattlesContext db, IOptions <BotConfiguration> options, TimeZoneNotifyService timeZoneNotifyService, TimeZoneService timeZoneService)
 {
     myBot = bot;
     myDateTimeZoneProvider = dateTimeZoneProvider;
     myClock                 = clock;
     myUrlHelper             = urlHelper;
     myDB                    = db;
     myTimeZoneNotifyService = timeZoneNotifyService;
     myTimeZoneService       = timeZoneService;
     mySuperAdministrators   = options.Value?.SuperAdministrators ?? new HashSet <long>(0);
 }
Exemplo n.º 22
0
        public IngressClient(HttpClient httpClient, TelemetryClient telemetryClient, RaidBattlesContext context, IOptions <IngressConfiguration> options, IClock clock)
        {
            myHttpClient      = httpClient;
            myTelemetryClient = telemetryClient;
            myContext         = context;
            myClock           = clock;
            var configuration = options?.Value ?? throw new ArgumentNullException(nameof(options));

            myHttpClient.BaseAddress = configuration.ServiceUrl;
            myHttpClient.Timeout     = configuration.Timeout;
            myDefaultLocation        = configuration.DefaultLocation ?? new Location();
        }
Exemplo n.º 23
0
 public GymInlineQueryHandler(IUrlHelper urlHelper, GeneralInlineQueryHandler generalInlineQueryHandler, IngressClient ingressClient, ITelegramBotClientEx bot, RaidBattlesContext db, RaidService raidService, GeoCoderEx geoCoder, IClock clock, TimeZoneService timeZoneService)
 {
     myUrlHelper = urlHelper;
     myGeneralInlineQueryHandler = generalInlineQueryHandler;
     myIngressClient             = ingressClient;
     myBot             = bot;
     myDb              = db;
     myRaidService     = raidService;
     myGeoCoder        = geoCoder;
     myClock           = clock;
     myTimeZoneService = timeZoneService;
 }
Exemplo n.º 24
0
        public RaidService(RaidBattlesContext context, IDictionary <long, ITelegramBotClient> bots, TelemetryClient telemetryClient, IMemoryCache memoryCache, Func <ITelegramBotClient, ChatInfo> chatInfo, IOptions <BotConfiguration> botOptions)
        {
            myContext         = context;
            myTelemetryClient = telemetryClient;
            myMemoryCache     = memoryCache;
            myLogChat         = botOptions.Value?.LogChatId is { } chatId&& chatId != default ? chatId : default(long?);

            var fallbackBot = botOptions.Value?.DefaultBotId is {} defaultBotId?bots[defaultBotId] : bots.Values.First(); // at least one bot, default

            myBot = botId => botId.HasValue && bots.TryGetValue(botId.Value, out var bot) ? bot : fallbackBot;

            myChatInfo = botId => chatInfo(myBot(botId));
        }
 public VoteCallbackQueryHandler(TelemetryClient telemetryClient, RaidBattlesContext db, IDictionary <long, ITelegramBotClient> bots,
                                 ITelegramBotClient bot, RaidService raidService, IUrlHelper urlHelper, IClock clock, IOptions <BotConfiguration> options,
                                 FriendshipService friendshipService, TimeZoneNotifyService timeZoneNotifyService)
 {
     myTelemetryClient = telemetryClient;
     myDb                    = db;
     myBots                  = bots;
     myBot                   = bot;
     myRaidService           = raidService;
     myUrlHelper             = urlHelper;
     myClock                 = clock;
     myFriendshipService     = friendshipService;
     myTimeZoneNotifyService = timeZoneNotifyService;
     myVoteTimeout           = options.Value.VoteTimeout;
     myBlackList             = options.Value.BlackList ?? new HashSet <long>(0);
 }
Exemplo n.º 26
0
 public FriendshipService(RaidBattlesContext db)
 {
     myDB = db;
 }
Exemplo n.º 27
0
 public GymHelper(RaidBattlesContext dbContext, TelemetryClient telemetryClient, IOptions <GeoCoderConfiguration> geoCoderOptions)
 {
     myDbContext       = dbContext;
     myTelemetryClient = telemetryClient;
     myGeoCoderOptions = geoCoderOptions.Value ?? throw new ArgumentNullException(nameof(geoCoderOptions));
 }
Exemplo n.º 28
0
 public StatusProvider(IUrlHelper urlHelper, RaidBattlesContext db)
 {
     myUrlHelper = urlHelper;
     myDB        = db;
 }
Exemplo n.º 29
0
 public StatusProvider(IUrlHelper urlHelper, RaidBattlesContext db, ZonedClock clock)
 {
     myUrlHelper = urlHelper;
     myDB        = db;
     myClock     = clock;
 }
Exemplo n.º 30
0
 public PortalModel(RaidBattlesContext db, ZonedClock clock, IngressClient ingressClient)
 {
     myDb            = db;
     myClock         = clock;
     myIngressClient = ingressClient;
 }