Clear() public method

public Clear ( ) : void
return void
コード例 #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));
     }
 }
コード例 #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 ());
            }
        }
コード例 #3
0
ファイル: AddWarn.cs プロジェクト: hao507/xiaoguxian
        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();
            }
        }