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

◆ SkipOrConsumeCommentMultiSegmentWithRollback()

bool System.Text.Json.Utf8JsonReader.SkipOrConsumeCommentMultiSegmentWithRollback ( )
inlineprivate

Definition at line 3702 of file Utf8JsonReader.cs.

3703 {
3705 SequencePosition start = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() + _consumed);
3708 if (flag)
3709 {
3710 if (_readerOptions.CommentHandling == JsonCommentHandling.Allow)
3711 {
3712 SequencePosition end = new SequencePosition(_currentPosition.GetObject(), _currentPosition.GetInteger() + _consumed);
3715 HasValueSequence = !readOnlySequence.IsSingleSegment;
3716 if (HasValueSequence)
3717 {
3719 }
3720 else
3721 {
3722 ValueSpan = readOnlySequence.First.Span;
3723 }
3724 if (_tokenType != JsonTokenType.Comment)
3725 {
3727 }
3728 _tokenType = JsonTokenType.Comment;
3729 }
3730 }
3731 else
3732 {
3734 _consumed = 0;
3735 }
3736 return flag;
3737 }
ReadOnlySequence< T > Slice(long start, long length)
bool SkipCommentMultiSegment(out int tailBytesToIgnore)
readonly ReadOnlySequence< byte > _sequence
ReadOnlySequence< byte > ValueSequence

References System.Text.Json.Utf8JsonReader._consumed, System.Text.Json.Utf8JsonReader._currentPosition, System.Text.Json.Utf8JsonReader._previousTokenType, System.Text.Json.Utf8JsonReader._readerOptions, System.Text.Json.Utf8JsonReader._sequence, System.Text.Json.Utf8JsonReader._tokenType, System.Text.Json.Utf8JsonReader._totalConsumed, System.Text.Json.Utf8JsonReader.BytesConsumed, System.Text.Json.JsonReaderOptions.CommentHandling, System.Text.Json.Dictionary, System.SequencePosition.GetInteger(), System.SequencePosition.GetObject(), System.Text.Json.Utf8JsonReader.HasValueSequence, System.L, System.Text.Json.Utf8JsonReader.SkipCommentMultiSegment(), System.Buffers.ReadOnlySequence< T >.Slice(), System.start, System.Text.Json.Utf8JsonReader.ValueSequence, and System.Text.Json.Utf8JsonReader.ValueSpan.

Referenced by System.Text.Json.Utf8JsonReader.ConsumeNextTokenFromLastNonCommentTokenMultiSegment(), System.Text.Json.Utf8JsonReader.ConsumeNextTokenMultiSegment(), System.Text.Json.Utf8JsonReader.ConsumeValueMultiSegment(), System.Text.Json.Utf8JsonReader.SkipAllCommentsMultiSegment(), and System.Text.Json.Utf8JsonReader.SkipAllCommentsMultiSegment().