예제 #1
0
        /// <summary>
        /// Deserialize Dictionary only string key
        /// </summary>
        /// <typeparam name="V"></typeparam>
        /// <param name="s"></param>
        /// <returns></returns>
        public static Dictionary <string, V> DictionaryDeserializer <V>(ListTreeNode <T> s)
        {
            var d = new Dictionary <string, V>();

            foreach (var kv in s.ObjectItems())
            {
                var value = default(V);
                GenericDeserializer <T, V> .Deserialize(kv.Value, ref value);

                d.Add(kv.Key.GetString(), value);
            }

            return(d);
        }
예제 #2
0
 public void Deserialize <T, U>(ListTreeNode <T> src, ref U dst)
     where T : IListTreeItem, IValue <T>
 {
     GenericDeserializer <T, U> .Deserialize(src, ref dst);
 }