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

◆ TryGetDateTimeCore()

bool System.Text.Json.Utf8JsonReader.TryGetDateTimeCore ( out DateTime value)
inlinepackage

Definition at line 4777 of file Utf8JsonReader.cs.

4778 {
4779 ReadOnlySpan<byte> readOnlySpan = default(Span<byte>);
4780 int num = (_stringHasEscaping ? 252 : 42);
4781 if (HasValueSequence)
4782 {
4784 if (!JsonHelpers.IsInRangeInclusive(length, 10L, num))
4785 {
4786 value = default(DateTime);
4787 return false;
4788 }
4789 Span<byte> destination = stackalloc byte[_stringHasEscaping ? 252 : 42];
4791 source.CopyTo(destination);
4793 }
4794 else
4795 {
4796 if (!JsonHelpers.IsInRangeInclusive(ValueSpan.Length, 10, num))
4797 {
4798 value = default(DateTime);
4799 return false;
4800 }
4802 }
4804 {
4805 return JsonReaderHelper.TryGetEscapedDateTime(readOnlySpan, out value);
4806 }
4807 if (JsonHelpers.TryParseAsISO(readOnlySpan, out DateTime value2))
4808 {
4809 value = value2;
4810 return true;
4811 }
4812 value = default(DateTime);
4813 return false;
4814 }
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.TryGetEscapedDateTime(), System.Text.Json.JsonHelpers.TryParseAsISO(), System.value, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.GetDateTimeNoValidation(), and System.Text.Json.Utf8JsonReader.TryGetDateTime().