Ejemplo n.º 1
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("samplingAlgorithmType");
     writer.WriteStringValue(SamplingAlgorithmType.ToString());
     writer.WriteEndObject();
 }
Ejemplo n.º 2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(Rule))
     {
         writer.WritePropertyName("rule");
         writer.WriteStringValue(Rule.Value.ToString());
     }
     if (Optional.IsDefined(Seed))
     {
         if (Seed != null)
         {
             writer.WritePropertyName("seed");
             writer.WriteNumberValue(Seed.Value);
         }
         else
         {
             writer.WriteNull("seed");
         }
     }
     writer.WritePropertyName("samplingAlgorithmType");
     writer.WriteStringValue(SamplingAlgorithmType.ToString());
     writer.WriteEndObject();
 }