JsonSerializer.SerializeAsyncEnumerable Метод
Определение
Важно!
Некоторые сведения относятся к предварительной версии продукта, в которую до выпуска могут быть внесены существенные изменения. Майкрософт не предоставляет никаких гарантий, явных или подразумеваемых, относительно приведенных здесь сведений.
Перегрузки
SerializeAsyncEnumerable<TValue>(PipeWriter, IAsyncEnumerable<TValue>, Boolean, JsonSerializerOptions, CancellationToken)
- Исходный код:
- JsonSerializer.Write.Pipe.cs
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeWriter utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, bool topLevelValues = false, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeWriter utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, bool topLevelValues = false, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeAsyncEnumerable : System.IO.Pipelines.PipeWriter * System.Collections.Generic.IAsyncEnumerable<'Value> * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
static member SerializeAsyncEnumerable : System.IO.Pipelines.PipeWriter * System.Collections.Generic.IAsyncEnumerable<'Value> * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SerializeAsyncEnumerable(Of TValue) (utf8Json As PipeWriter, value As IAsyncEnumerable(Of TValue), Optional topLevelValues As Boolean = false, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task
Параметры типа
- TValue
Параметры
- utf8Json
- PipeWriter
- value
- IAsyncEnumerable<TValue>
- topLevelValues
- Boolean
- options
- JsonSerializerOptions
- cancellationToken
- CancellationToken
Возвращаемое значение
- Атрибуты
Применяется к
SerializeAsyncEnumerable<TValue>(PipeWriter, IAsyncEnumerable<TValue>, JsonTypeInfo<TValue>, Boolean, CancellationToken)
- Исходный код:
- JsonSerializer.Write.Pipe.cs
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Pipelines.PipeWriter utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues = false, System.Threading.CancellationToken cancellationToken = default);
static member SerializeAsyncEnumerable : System.IO.Pipelines.PipeWriter * System.Collections.Generic.IAsyncEnumerable<'Value> * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SerializeAsyncEnumerable(Of TValue) (utf8Json As PipeWriter, value As IAsyncEnumerable(Of TValue), jsonTypeInfo As JsonTypeInfo(Of TValue), Optional topLevelValues As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task
Параметры типа
- TValue
Параметры
- utf8Json
- PipeWriter
- value
- IAsyncEnumerable<TValue>
- jsonTypeInfo
- JsonTypeInfo<TValue>
- topLevelValues
- Boolean
- cancellationToken
- CancellationToken
Возвращаемое значение
Применяется к
SerializeAsyncEnumerable<TValue>(Stream, IAsyncEnumerable<TValue>, Boolean, JsonSerializerOptions, CancellationToken)
- Исходный код:
- JsonSerializer.Write.Stream.cs
[System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")]
[System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")]
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, bool topLevelValues = false, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, bool topLevelValues = false, System.Text.Json.JsonSerializerOptions? options = default, System.Threading.CancellationToken cancellationToken = default);
[<System.Diagnostics.CodeAnalysis.RequiresDynamicCode("JSON serialization and deserialization might require types that cannot be statically analyzed and might need runtime code generation. Use System.Text.Json source generation for native AOT applications.")>]
[<System.Diagnostics.CodeAnalysis.RequiresUnreferencedCode("JSON serialization and deserialization might require types that cannot be statically analyzed. Use the overload that takes a JsonTypeInfo or JsonSerializerContext, or make sure all of the required types are preserved.")>]
static member SerializeAsyncEnumerable : System.IO.Stream * System.Collections.Generic.IAsyncEnumerable<'Value> * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
static member SerializeAsyncEnumerable : System.IO.Stream * System.Collections.Generic.IAsyncEnumerable<'Value> * bool * System.Text.Json.JsonSerializerOptions * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SerializeAsyncEnumerable(Of TValue) (utf8Json As Stream, value As IAsyncEnumerable(Of TValue), Optional topLevelValues As Boolean = false, Optional options As JsonSerializerOptions = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task
Параметры типа
- TValue
Параметры
- utf8Json
- Stream
- value
- IAsyncEnumerable<TValue>
- topLevelValues
- Boolean
- options
- JsonSerializerOptions
- cancellationToken
- CancellationToken
Возвращаемое значение
- Атрибуты
Применяется к
SerializeAsyncEnumerable<TValue>(Stream, IAsyncEnumerable<TValue>, JsonTypeInfo<TValue>, Boolean, CancellationToken)
- Исходный код:
- JsonSerializer.Write.Stream.cs
public static System.Threading.Tasks.Task SerializeAsyncEnumerable<TValue>(System.IO.Stream utf8Json, System.Collections.Generic.IAsyncEnumerable<TValue> value, System.Text.Json.Serialization.Metadata.JsonTypeInfo<TValue> jsonTypeInfo, bool topLevelValues = false, System.Threading.CancellationToken cancellationToken = default);
static member SerializeAsyncEnumerable : System.IO.Stream * System.Collections.Generic.IAsyncEnumerable<'Value> * System.Text.Json.Serialization.Metadata.JsonTypeInfo<'Value> * bool * System.Threading.CancellationToken -> System.Threading.Tasks.Task
Public Function SerializeAsyncEnumerable(Of TValue) (utf8Json As Stream, value As IAsyncEnumerable(Of TValue), jsonTypeInfo As JsonTypeInfo(Of TValue), Optional topLevelValues As Boolean = false, Optional cancellationToken As CancellationToken = Nothing) As Task
Параметры типа
- TValue
Параметры
- utf8Json
- Stream
- value
- IAsyncEnumerable<TValue>
- jsonTypeInfo
- JsonTypeInfo<TValue>
- topLevelValues
- Boolean
- cancellationToken
- CancellationToken