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

◆ TryGetGuidCore()

bool System.Text.Json.Utf8JsonReader.TryGetGuidCore ( out Guid value)
inlinepackage

Definition at line 4873 of file Utf8JsonReader.cs.

4874 {
4875 ReadOnlySpan<byte> readOnlySpan = default(Span<byte>);
4876 int num = (_stringHasEscaping ? 216 : 36);
4877 if (HasValueSequence)
4878 {
4880 if (length > num)
4881 {
4882 value = default(Guid);
4883 return false;
4884 }
4885 Span<byte> destination = stackalloc byte[_stringHasEscaping ? 216 : 36];
4887 source.CopyTo(destination);
4889 }
4890 else
4891 {
4892 if (ValueSpan.Length > num)
4893 {
4894 value = default(Guid);
4895 return false;
4896 }
4898 }
4900 {
4901 return JsonReaderHelper.TryGetEscapedGuid(readOnlySpan, out value);
4902 }
4903 if (readOnlySpan.Length == 36 && Utf8Parser.TryParse(readOnlySpan, out Guid value2, out int _, 'D'))
4904 {
4905 value = value2;
4906 return true;
4907 }
4908 value = default(Guid);
4909 return false;
4910 }
static bool TryParse(ReadOnlySpan< byte > source, out bool value, out int bytesConsumed, char standardFormat='\0')
ReadOnlySequence< T > Slice(long start, long length)
ReadOnlySequence< byte > ValueSequence

References System.Text.Json.Utf8JsonReader._stringHasEscaping, System.destination, System.Text.Json.Dictionary, System.Text.Json.Utf8JsonReader.HasValueSequence, System.Buffers.ReadOnlySequence< T >.Length, System.length, System.ReadOnlySpan< T >.Length, System.Buffers.ReadOnlySequence< T >.Slice(), System.source, System.Text.Json.JsonReaderHelper.TryGetEscapedGuid(), System.Buffers.Text.Utf8Parser.TryParse(), System.value, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.GetGuidNoValidation(), and System.Text.Json.Utf8JsonReader.TryGetGuid().