Esempio n. 1
0
        public PoGoInventory(IApiInventory apiInventory, IApiDownload apiDownload, ILogicSettings logicSettings)
        {
            _apiInventory = apiInventory;
            _apiDownload = apiDownload;
            _logicSettings = logicSettings;

            ShouldUpdateInventory = true;

            Task.Run(UpdateInventory);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }
Esempio n. 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);
        }