private WriteJson ( JsonWriter writer, object value, |
||
writer | JsonWriter | |
value | object | |
serializer | ||
return | void |
/// <summary> /// /// </summary> /// <param name="owner"></param> /// <returns></returns> public string ToScript(Control owner) { if (this.RenderColumnsOnly) { var sb = new StringBuilder(); var sw = new StringWriter(sb); var writer = new JsonTextWriter(sw); ItemCollectionJsonConverter converter = new ItemCollectionJsonConverter(); converter.Name = "columns"; converter.PropertyName = "Items"; converter.Owner = this; converter.WriteJson(writer, this.ItemsProxy, null); return(sw.GetStringBuilder().ToString()); } else { return(new ClientConfig().Serialize(this, true)); } }
/// <summary> /// /// </summary> /// <param name="owner"></param> /// <returns></returns> public string ToScript(Control owner) { if (this.RenderColumnsOnly) { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); JsonTextWriter writer = new JsonTextWriter(sw); ItemCollectionJsonConverter converter = new ItemCollectionJsonConverter(); converter.Name = "columns"; converter.PropertyName = "Items"; converter.Owner = this; converter.WriteJson(writer, this.ItemsProxy, null); return sw.GetStringBuilder().ToString(); } else { return new ClientConfig().Serialize(this, true); } }