Exemplo n.º 1
0
 public Task WriteJsonStructAsync(IJsonStruct value, CancellationToken cancellationToken = default(CancellationToken))
 {
     if (value == null)
     {
         return(JsonTextWriter.WriteNullAsync(cancellationToken));
     }
     return(value.WriteAsync(this, cancellationToken));
 }
Exemplo n.º 2
0
 /// <summary>
 /// Emits supplied value to the writer.
 /// </summary>
 /// <param name="value"></param>
 /// <param name="cancellationToken"></param>
 public Task WriteJsonStructAsync(IJsonStruct value, CancellationToken cancellationToken = default(CancellationToken))
 {
     if (value == null)
     {
         LastWrittenToken = WrittenToken.Null;
         return(TextWriter.WriteAsync("null"));
     }
     return(value.WriteAsync(this, cancellationToken));
 }