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

◆ TryGetBytesFromBase64()

bool System.Text.Json.Utf8JsonReader.TryGetBytesFromBase64 ( [NotNullWhen(true)] out byte?[] value)
inline

Definition at line 4399 of file Utf8JsonReader.cs.

4400 {
4401 if (TokenType != JsonTokenType.String)
4402 {
4403 throw ThrowHelper.GetInvalidOperationException_ExpectedString(TokenType);
4404 }
4405 ReadOnlySpan<byte> readOnlySpan;
4406 if (!HasValueSequence)
4407 {
4409 }
4410 else
4411 {
4414 }
4415 ReadOnlySpan<byte> readOnlySpan2 = readOnlySpan;
4417 {
4418 int idx = readOnlySpan2.IndexOf<byte>(92);
4419 return JsonReaderHelper.TryGetUnescapedBase64Bytes(readOnlySpan2, idx, out value);
4420 }
4421 return JsonReaderHelper.TryDecodeBase64(readOnlySpan2, out value);
4422 }
ReadOnlySequence< byte > ValueSequence

References System.Text.Json.Utf8JsonReader._stringHasEscaping, System.Text.Json.Dictionary, System.Text.Json.ThrowHelper.GetInvalidOperationException_ExpectedString(), System.Text.Json.Utf8JsonReader.HasValueSequence, System.Text.Json.JsonReaderHelper.TryDecodeBase64(), System.Text.Json.JsonReaderHelper.TryGetUnescapedBase64Bytes(), System.value, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.GetBytesFromBase64().