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

◆ TryGetDateTimeOffsetCore()

bool System.Text.Json.Utf8JsonReader.TryGetDateTimeOffsetCore ( out DateTimeOffset value)
inlinepackage

Definition at line 4825 of file Utf8JsonReader.cs.

4826 {
4827 ReadOnlySpan<byte> readOnlySpan = default(Span<byte>);
4828 int num = (_stringHasEscaping ? 252 : 42);
4829 if (HasValueSequence)
4830 {
4832 if (!JsonHelpers.IsInRangeInclusive(length, 10L, num))
4833 {
4834 value = default(DateTimeOffset);
4835 return false;
4836 }
4837 Span<byte> destination = stackalloc byte[_stringHasEscaping ? 252 : 42];
4839 source.CopyTo(destination);
4841 }
4842 else
4843 {
4844 if (!JsonHelpers.IsInRangeInclusive(ValueSpan.Length, 10, num))
4845 {
4846 value = default(DateTimeOffset);
4847 return false;
4848 }
4850 }
4852 {
4853 return JsonReaderHelper.TryGetEscapedDateTimeOffset(readOnlySpan, out value);
4854 }
4855 if (JsonHelpers.TryParseAsISO(readOnlySpan, out DateTimeOffset value2))
4856 {
4857 value = value2;
4858 return true;
4859 }
4860 value = default(DateTimeOffset);
4861 return false;
4862 }
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.Text.Json.JsonHelpers.IsInRangeInclusive(), System.L, System.Buffers.ReadOnlySequence< T >.Length, System.length, System.ReadOnlySpan< T >.Length, System.Buffers.ReadOnlySequence< T >.Slice(), System.source, System.Text.Json.JsonReaderHelper.TryGetEscapedDateTimeOffset(), System.Text.Json.JsonHelpers.TryParseAsISO(), System.value, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.GetDateTimeOffsetNoValidation(), and System.Text.Json.Utf8JsonReader.TryGetDateTimeOffset().