예제 #1
0
            public static string Convert(string input)
            {
                var replayPlayer = new ReplayPlayer(input);
                Body rootBody = replayPlayer.RootBody;
                existing = new Dictionary<int, List<object>>();
                result = new List<object>();

                result.Add(replayPlayer.DT);
                rootBody.ChildAdded += BodyAdded;

                while (!replayPlayer.IsAtEnd)
                {
                    iter = new List<string>();
                    replayPlayer.Update();
                    result.Add(iter);
                }

                return (new JavaScriptSerializer()).Serialize(result);
            }
예제 #2
0
        public static string Convert(string input)
        {
            var  replayPlayer = new ReplayPlayer(input);
            Body rootBody     = replayPlayer.RootBody;

            existing = new Dictionary <int, List <object> >();
            result   = new List <object>();

            result.Add(replayPlayer.DT);
            rootBody.ChildAdded += BodyAdded;

            while (!replayPlayer.IsAtEnd)
            {
                iter = new List <string>();
                replayPlayer.Update();
                result.Add(iter);
            }

            return((new JavaScriptSerializer()).Serialize(result));
        }
예제 #3
0
            public static string Convert(SerializationRoot input)
            {
                System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
                var replayPlayer = new ReplayPlayer(input);
                Body rootBody = replayPlayer.RootBody;
                existing = new Dictionary<int, List<object>>();
                result = new List<object>();

                result.Add(replayPlayer.DT);
                rootBody.ChildAdded += BodyAdded;

                while (!replayPlayer.IsAtEnd)
                {
                    iter = new List<string>();
                    replayPlayer.Update();
                    result.Add(iter);
                }
                var res = (new JavaScriptSerializer()).Serialize(result);
                //replace id of root body to 0
                res = res.Replace(","+rootBody.Id+",", ",0,");
                return res;
            }
예제 #4
0
        public static string Convert(SerializationRoot input)
        {
            System.Threading.Thread.CurrentThread.CurrentCulture = new System.Globalization.CultureInfo("en-US");
            var  replayPlayer = new ReplayPlayer(input);
            Body rootBody     = replayPlayer.RootBody;

            existing = new Dictionary <int, List <object> >();
            result   = new List <object>();

            result.Add(replayPlayer.DT);
            rootBody.ChildAdded += BodyAdded;

            while (!replayPlayer.IsAtEnd)
            {
                iter = new List <string>();
                replayPlayer.Update();
                result.Add(iter);
            }
            var res = (new JavaScriptSerializer()).Serialize(result);

            //replace id of root body to 0
            res = res.Replace("," + rootBody.Id + ",", ",0,");
            return(res);
        }