WriteTo() public method

Writes this token to a JsonWriter.
public WriteTo ( JsonWriter writer ) : void
writer JsonWriter A into which this method will write.
return void
Esempio n. 1
0
 public override void WriteTo(JsonWriter writer, params JsonConverter[] converters)
 {
     writer.WriteStartObject();
     foreach (JToken jtoken in this.ChildrenTokens)
     {
         JProperty jproperty = (JProperty)jtoken;
         jproperty.WriteTo(writer, converters);
     }
     writer.WriteEndObject();
 }
Esempio n. 2
0
 public override void WriteTo(JsonWriter writer, params JsonConverter[] converters)
 {
     writer.WriteStartObject();
     using (IEnumerator <JToken> enumerator = this.ChildrenTokens.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             JProperty jProperty = (JProperty)enumerator.get_Current();
             jProperty.WriteTo(writer, converters);
         }
     }
     writer.WriteEndObject();
 }
Esempio n. 3
0
 static int WriteTo(IntPtr L)
 {
     try
     {
         ToLua.CheckArgsCount(L, 3);
         Newtonsoft.Json.Linq.JProperty  obj  = (Newtonsoft.Json.Linq.JProperty)ToLua.CheckObject <Newtonsoft.Json.Linq.JProperty>(L, 1);
         Newtonsoft.Json.JsonWriter      arg0 = (Newtonsoft.Json.JsonWriter)ToLua.CheckObject <Newtonsoft.Json.JsonWriter>(L, 2);
         Newtonsoft.Json.JsonConverter[] arg1 = ToLua.CheckObjectArray <Newtonsoft.Json.JsonConverter>(L, 3);
         obj.WriteTo(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }
Esempio n. 4
0
 static int WriteTo(IntPtr L)
 {
     try
     {
         int count = LuaDLL.lua_gettop(L);
         Newtonsoft.Json.Linq.JProperty  obj  = (Newtonsoft.Json.Linq.JProperty)ToLua.CheckObject(L, 1, typeof(Newtonsoft.Json.Linq.JProperty));
         Newtonsoft.Json.JsonWriter      arg0 = (Newtonsoft.Json.JsonWriter)ToLua.CheckObject(L, 2, typeof(Newtonsoft.Json.JsonWriter));
         Newtonsoft.Json.JsonConverter[] arg1 = ToLua.CheckParamsObject <Newtonsoft.Json.JsonConverter>(L, 3, count - 2);
         obj.WriteTo(arg0, arg1);
         return(0);
     }
     catch (Exception e)
     {
         return(LuaDLL.toluaL_exception(L, e));
     }
 }