Exemple #1
0
        public void CacheMemoryTest()
        {
            ApiService svc = new ApiService(APIKEY);

            //one region's all static-datas take 21MB from physical memory
            svc.staticApi.GetChampions(Region, Region.ToLanguage(), champData.all, true);
            svc.staticApi.GetItems(Region, Region.ToLanguage(), itemListData.all, true);
            svc.staticApi.GetLanguages(Region, true);
            svc.staticApi.GetMaps(Region, Region.ToLanguage(), true);
            svc.staticApi.GetMasteries(Region, Region.ToLanguage(), masteryListData.all, true);
            svc.staticApi.GetRunes(Region, Region.ToLanguage(), runeListData.all, true);
            svc.staticApi.GetSummonerSpells(Region, Region.ToLanguage(), spellData.all, true);
            svc.staticApi.GetVersions(Region, true);

            //than you watch MB size on Diagnostic Tools
            CurrentGame data = JsonConvert.DeserializeObject <CurrentGame>(JsonCurrentGame);

            svc.Smartproperty(data);//after every query, smartproperty faster than first query
        }