Example #1
0
        private object deserializeChildren <K, V>(Ikadn.IkadnBaseObject rawData, LoadSession session)
        {
            var saveData = rawData.To <IkonArray>();
            var result   = (IDictionary <K, V>) this.constructor();

            for (int i = 0; i < saveData.Count; i += 2)
            {
                result.Add(
                    session.Load <K>(saveData[i]),
                    session.Load <V>(saveData[i + 1])
                    );
            }

            return(result);
        }
Example #2
0
        private object deserializeChildren <T>(Ikadn.IkadnBaseObject rawData, LoadSession session)
        {
            var saveData = rawData.To <IkonArray>();
            var result   = (ICollection <T>) this.constructor();

            foreach (var elementData in saveData)
            {
                result.Add(session.Load <T>(elementData));
            }

            return(result);
        }
Example #3
0
        private object deserializeChildren <T>(Ikadn.IkadnBaseObject rawData, LoadSession session)
        {
            var saveData = rawData.To <IkonArray>();
            var result   = (T[])this.lengthConstructor(saveData.Count);

            for (int i = 0; i < saveData.Count; i++)
            {
                result[i] = session.Load <T>(saveData[i]);
            }

            return(result);
        }