Ejemplo n.º 1
0
 static void Test(IJsonProvider provider, object obj)
 {
     string json = "";
     object newObj = null;
     CodeTimer.TimeLine(provider.GetType().Name + " - Serialize", 10 * 10000, i => json = provider.Serialize(obj));
     CodeTimer.TimeLine(provider.GetType().Name + " - Deserialize", 10 * 10000, i => newObj = provider.Deserialize(json, obj.GetType()));
 }
Ejemplo n.º 2
0
        static void Test(IJsonProvider provider, object obj)
        {
            string json   = "";
            object newObj = null;

            CodeTimer.TimeLine(provider.GetType().Name + " - Serialize", 10 * 10000, i => json     = provider.Serialize(obj));
            CodeTimer.TimeLine(provider.GetType().Name + " - Deserialize", 10 * 10000, i => newObj = provider.Deserialize(json, obj.GetType()));
        }