共用方式為


CosmosSerializer.FromStream<T>(Stream) Method

Definition

Convert a Stream of JSON to an object. The implementation is responsible for Disposing of the stream, including when an exception is thrown, to avoid memory leaks.

public abstract T FromStream<T> (System.IO.Stream stream);
abstract member FromStream : System.IO.Stream -> 'T
Public MustOverride Function FromStream(Of T) (stream As Stream) As T

Type Parameters

T

Any type passed to Container.

Parameters

stream
Stream

The Stream response containing JSON from Cosmos DB.

Returns

T

The object deserialized from the stream.

Applies to