Example #1
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("distributionType");
     writer.WriteStringValue(DistributionType.ToString());
     writer.WriteEndObject();
 }
Example #2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(ProcessCountPerInstance))
     {
         if (ProcessCountPerInstance != null)
         {
             writer.WritePropertyName("processCountPerInstance");
             writer.WriteNumberValue(ProcessCountPerInstance.Value);
         }
         else
         {
             writer.WriteNull("processCountPerInstance");
         }
     }
     writer.WritePropertyName("distributionType");
     writer.WriteStringValue(DistributionType.ToString());
     writer.WriteEndObject();
 }
Example #3
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     if (Optional.IsDefined(ParameterServerCount))
     {
         writer.WritePropertyName("parameterServerCount");
         writer.WriteNumberValue(ParameterServerCount.Value);
     }
     if (Optional.IsDefined(WorkerCount))
     {
         if (WorkerCount != null)
         {
             writer.WritePropertyName("workerCount");
             writer.WriteNumberValue(WorkerCount.Value);
         }
         else
         {
             writer.WriteNull("workerCount");
         }
     }
     writer.WritePropertyName("distributionType");
     writer.WriteStringValue(DistributionType.ToString());
     writer.WriteEndObject();
 }