コード例 #1
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Query))
     {
         writer.WritePropertyName("query");
         writer.WriteStringValue(Query);
     }
     if (Optional.IsDefined(CallingOptions))
     {
         writer.WritePropertyName("callingOptions");
         writer.WriteObjectValue(CallingOptions);
     }
     writer.WritePropertyName("targetKind");
     writer.WriteStringValue(TargetKind.ToString());
     if (Optional.IsDefined(ApiVersion))
     {
         writer.WritePropertyName("apiVersion");
         writer.WriteStringValue(ApiVersion);
     }
     foreach (var item in AdditionalProperties)
     {
         writer.WritePropertyName(item.Key);
         writer.WriteObjectValue(item.Value);
     }
     writer.WriteEndObject();
 }
コード例 #2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("targetKind");
     writer.WriteStringValue(TargetKind.ToString());
     if (Optional.IsDefined(ApiVersion))
     {
         writer.WritePropertyName("apiVersion");
         writer.WriteStringValue(ApiVersion);
     }
     writer.WriteEndObject();
 }