예제 #1
0
 public static void Serialise(this PageInfo pageInfo, JsonWriter writer)
 {
     writer.WriteMember("PageInfo");
     writer.WriteObject();
     writer.WriteMember("TotalCount");
     writer.WriteValue(pageInfo.TotalCount.ToString());
     writer.WriteMember("ItemsCount");
     writer.WriteValue(pageInfo.ItemsCount.ToString());
     writer.WriteMember("StartIndex");
     writer.WriteValue(pageInfo.StartIndex.ToString());
     writer.WriteEndObject();
 }
예제 #2
0
 public static void Serialise(this Link link, JsonWriter writer)
 {
     writer.WriteObject();
     writer.WriteMember("rel");
     writer.WriteValue(link.rel);
     writer.WriteMember("href");
     writer.WriteValue(link.href);
     writer.WriteEndObject();
 }