System\Text\Json\Writer\Utf8JsonWriter.cs (7)
263if (_options.MaxDepth == 0)
577if (CurrentDepth >= _options.MaxDepth)
671Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1117Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1246=> ThrowHelper.ThrowInvalidOperationException(resource, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
1251=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType);
1256=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);