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

◆ ValidateStart()

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

Definition at line 269 of file Utf8JsonWriter.cs.

270 {
271 if (_inObject)
272 {
273 if (_tokenType != JsonTokenType.PropertyName)
274 {
275 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayWithoutProperty, 0, 0, _tokenType);
276 }
277 }
278 else if (CurrentDepth == 0 && _tokenType != 0)
279 {
280 ThrowHelper.ThrowInvalidOperationException(ExceptionResource.CannotStartObjectArrayAfterPrimitiveOrClose, 0, 0, _tokenType);
281 }
282 }

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.WriteStartSlow().