Clear() public method

public Clear ( ) : void
return void
Exemplo n.º 1
0
 static int Clear(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 1);
         LitJson.JsonData obj = (LitJson.JsonData)ToLua.CheckObject(L, 1, typeof(LitJson.JsonData));
         obj.Clear();
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Exemplo n.º 2
0
        public void PropertiesOrderTest ()
        {
            JsonData data = new JsonData ();

            string json = "{\"first\":\"one\",\"second\":\"two\"," +
                "\"third\":\"three\",\"fourth\":\"four\"}";

            for (int i = 0; i < 10; i++) {
                data.Clear ();

                data["first"]  = "one";
                data["second"] = "two";
                data["third"]  = "three";
                data["fourth"] = "four";

                Assert.AreEqual (json, data.ToJson ());
            }
        }
Exemplo n.º 3
0
        private void button2_Click(object sender, EventArgs e)
        {
            JsonData data = new JsonData();

            string json = "{\"first\":\"one\",\"second\":\"two\"," +
                "\"third\":\"three\",\"fourth\":\"four\"}";

            for (int i = 0; i < 10; i++)
            {
                data.Clear();

                data["first"] = "one";
                data["second"] = "two";
                data["third"] = "three";
                data["fourth"] = "four";

                json += data.ToJson();
            }
        }