示例#1
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings)
        {
            _apiInventory = apiInventory;
            _apiDownload = apiDownload;
            _logicSettings = logicSettings;

            ShouldUpdateInventory = true;

            Task.Run(UpdateInventory);
        }
示例#2
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings, CancellationToken token)
        {
            _apiInventory = apiInventory;
            _apiDownload = apiDownload;
            _logicSettings = logicSettings;
            _token = token;

            ShouldUpdateInventory = true;

            Task.Run(UpdateInventory);
        }
示例#3
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings)
        {
            _apiInventory = apiInventory;
            _apiDownload = apiDownload;
            _logicSettings = logicSettings;

            ShouldUpdateInventory = true;

            Task.Run(RequestInventory).GetAwaiter().GetResult();
            Task.Run(UpdateInventory);
        }
示例#4
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings, CancellationToken token)
        {
            _apiInventory  = apiInventory;
            _apiDownload   = apiDownload;
            _logicSettings = logicSettings;
            _token         = token;

            ShouldUpdateInventory = true;

            Task.Run(UpdateInventory);
        }
示例#5
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings, CancellationToken token)
        {
            _apiInventory  = apiInventory;
            _apiDownload   = apiDownload;
            _logicSettings = logicSettings;
            _token         = token;

            ShouldUpdateInventory = true;
            PokeballsDictionary   = new Dictionary <ItemId, int>()
            {
                { ItemId.ItemPokeBall, 0 },
                { ItemId.ItemGreatBall, 0 },
                { ItemId.ItemUltraBall, 0 },
                { ItemId.ItemMasterBall, 0 }
            };

            Task.Run(UpdateInventory);
        }