/// <summary> /// /// </summary> /// <param name="summoner"></param> /// <returns></returns> public static Dictionary <String, Object> ChampionMasteryListToDictionary(ChampionMasteryList championMasteryList) { if (championMasteryList == null) { throw new ArgumentException("parameter player is required."); } Dictionary <String, Object> propToValueMap = new Dictionary <String, Object>(); return(propToValueMap); }
/// <summary> /// /// </summary> /// <param name="propToValueMap"></param> /// <returns></returns> public static ChampionMasteryList DictionaryToChampionMasteryList(Dictionary <String, Object> propToValueMap) { ChampionMasteryList championMasteryList = new ChampionMasteryList(); #region ChampionId Property if (propToValueMap.ContainsKey(ChampionMasteryList.PropertyNames.Masteries) && propToValueMap[ChampionMasteryList.PropertyNames.Masteries] is Dictionary <String, Object> ) { Dictionary <String, Object> championMasteryPropValueMap = (Dictionary <String, Object>)propToValueMap[ChampionDB.PropertyNames.Data]; foreach (KeyValuePair <String, Object> championMasteryDict in championMasteryPropValueMap) { ChampionMastery championMastery = ChampionMasteryConverter.DictionaryToChampionMastery(championMasteryDict.Value as Dictionary <String, Object>); //championMasteryList.Data.Add(championMastery); } } #endregion return(championMasteryList); }
/// <summary> /// Converts a Summoner into a dictionary /// </summary> /// <param name="type">Optional - the type of the value parameter</param> /// <param name="value">Optional - the instance that is to be converted into a dictionary</param> /// <returns>A Dictionary containing the data contained in the value parameter</returns> public override Dictionary <String, Object> WriteJson(Type type, Object value) { ChampionMasteryList championMasteryList = (ChampionMasteryList)value; return(ChampionMasteryListToDictionary(championMasteryList)); }