System\Text\Json\Writer\Utf8JsonWriter.cs (7)
257if (_options.MaxDepth == 0)
571if (CurrentDepth >= _options.MaxDepth)
665Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1105Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1234=> ThrowHelper.ThrowInvalidOperationException(resource, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
1239=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType);
1244=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);