Beispiel #1
0
            /// <summary>
            /// Writes the json to a writer.
            /// </summary>
            /// <param name="writer">The writer to write to.</param>
            /// <param name="value">The value to serialize.</param>
            /// <param name="serializer">The serializer to use.</param>
            public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
            {
                writer.WriteStartObject();
                OrderByItem orderByItem = (OrderByItem)value;

                if (orderByItem.Item != null)
                {
                    writer.WritePropertyName(ItemName);
                    new CosmosElementJsonConverter().WriteJson(writer, orderByItem.Item, serializer);
                }

                writer.WriteEndObject();
            }
 public static CosmosElement ToCosmosElement(OrderByItem orderByItem)
 {
     return(orderByItem.cosmosObject);
 }