Пример #1
0
        public static async Task <ModelScoutAPI> GetOrCreateApi(long ChatId, ModelScoutAPIOptions Options)
        {
            ModelScoutAPI api;

            if (!_pool.TryGetValue(ChatId, out api))
            {
                api = new ModelScoutAPI(Options, (int)ChatId);
                _pool.Add(ChatId, api);
            }
            return(api);
        }
Пример #2
0
 public ModelScoutAPI(ModelScoutAPIOptions options)
 {
     this.Options = options;
 }
Пример #3
0
 public ModelScoutAPI(ModelScoutAPIOptions options, int TgChatId)
 {
     this.Options = options;
     this.User = _getUserByTgChatId(TgChatId);
 }