Esempio n. 1
0
 public static Task WriteAsJsonAsync <TValue>(
     this HttpResponse response,
     TValue value,
     CancellationToken cancellationToken = default)
 {
     return(response.WriteAsJsonAsync <TValue>(value, options: null, contentType: null, cancellationToken));
 }
Esempio n. 2
0
 public static Task WriteAsJsonAsync <TValue>(
     this HttpResponse response,
     [AllowNull] TValue value,
     JsonSerializerOptions?options,
     CancellationToken cancellationToken = default)
 {
     return(response.WriteAsJsonAsync <TValue>(value, options, contentType: null, cancellationToken));
 }
Esempio n. 3
0
 public static Task WriteAsJsonAsync(
     this HttpResponse response,
     object?value,
     Type type,
     JsonSerializerOptions?options,
     CancellationToken cancellationToken = default)
 {
     return(response.WriteAsJsonAsync(value, type, options, contentType: null, cancellationToken));
 }