Example #1
0
 protected void SerializeCommonProperties(Utf8JsonWriter writer)
 {
     writer.WritePropertyName("dataSourceCredentialType");
     writer.WriteStringValue(DataSourceCredentialType.ToString());
     writer.WriteNullStringValue("dataSourceCredentialName", DataSourceCredentialName);
     writer.WriteNullStringValue("dataSourceCredentialDescription", DataSourceCredentialDescription);
 }
Example #2
0
 void IUtf8JsonSerializable.Write(Utf8JsonWriter writer)
 {
     writer.WriteStartObject();
     writer.WritePropertyName("dataSourceCredentialType");
     writer.WriteStringValue(DataSourceCredentialType.ToString());
     writer.WritePropertyName("dataSourceCredentialName");
     writer.WriteStringValue(Name);
     if (Optional.IsDefined(Description))
     {
         writer.WritePropertyName("dataSourceCredentialDescription");
         writer.WriteStringValue(Description);
     }
     writer.WriteEndObject();
 }