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

◆ ValidateWritingValue()

void System.Text.Json.Utf8JsonWriter.ValidateWritingValue ( )
inlineprivate

Definition at line 4893 of file Utf8JsonWriter.cs.

4894 {
4895 if (_inObject)
4896 {
4897 if (_tokenType != JsonTokenType.PropertyName)
4898 {
4899 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueWithinObject, 0, 0, _tokenType);
4900 }
4901 }
4902 else if (CurrentDepth == 0 && _tokenType != 0)
4903 {
4904 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotWriteValueAfterPrimitiveOrClose, 0, 0, _tokenType);
4905 }
4906 }

References System.Text.Json.Utf8JsonWriter._inObject, System.Text.Json.Utf8JsonWriter._tokenType, System.Text.Json.Utf8JsonWriter.CurrentDepth, and System.Text.Json.ThrowHelper.ThrowInvalidOperationException().

Referenced by System.Text.Json.Utf8JsonWriter.WriteBase64ByOptions(), System.Text.Json.Utf8JsonWriter.WriteLiteralByOptions(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteNumberValue(), System.Text.Json.Utf8JsonWriter.WriteRawValue(), System.Text.Json.Utf8JsonWriter.WriteRawValue(), System.Text.Json.Utf8JsonWriter.WriteRawValue(), System.Text.Json.Utf8JsonWriter.WriteStringByOptions(), System.Text.Json.Utf8JsonWriter.WriteStringByOptions(), System.Text.Json.Utf8JsonWriter.WriteStringValue(), System.Text.Json.Utf8JsonWriter.WriteStringValue(), and System.Text.Json.Utf8JsonWriter.WriteStringValue().