Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReadAllAsync< TValue >()

static async ValueTask< TValue > System.Text.Json.JsonSerializer.ReadAllAsync< TValue > ( Stream utf8Json,
JsonTypeInfo jsonTypeInfo,
CancellationToken cancellationToken )
inlinestaticpackage

Definition at line 994 of file JsonSerializer.cs.

995 {
996 JsonSerializerOptions options = jsonTypeInfo.Options;
997 ReadBufferState bufferState = new ReadBufferState(options.DefaultBufferSize);
998 ReadStack readStack = default(ReadStack);
1000 JsonConverter converter = readStack.Current.JsonPropertyInfo.ConverterBase;
1001 JsonReaderState jsonReaderState = new JsonReaderState(options.GetReaderOptions());
1002 try
1003 {
1004 TValue result;
1005 do
1006 {
1009 }
1010 while (!bufferState.IsFinalBlock);
1011 return result;
1012 }
1013 finally
1014 {
1015 bufferState.Dispose();
1016 }
1017 }
static TValue ContinueDeserialize< TValue >(ref ReadBufferState bufferState, ref JsonReaderState jsonReaderState, ref ReadStack readStack, JsonConverter converter, JsonSerializerOptions options)
static async ValueTask< ReadBufferState > ReadFromStreamAsync(Stream utf8Json, ReadBufferState bufferState, CancellationToken cancellationToken)

References System.cancellationToken, System.Text.Json.JsonSerializer.ContinueDeserialize< TValue >(), System.converter, System.Collections.Generic.Dictionary< TKey, TValue >.Initialize(), System.options, and System.Text.Json.JsonSerializer.ReadFromStreamAsync().

Referenced by System.Text.Json.JsonSerializer.DeserializeAsync< TValue >(), and System.Text.Json.JsonSerializer.DeserializeAsync< TValue >().