System\Text\Json\Writer\Utf8JsonWriter.cs (7)
257if (_options.MaxDepth == 0)
618if (CurrentDepth >= _options.MaxDepth)
712Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1152Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1281=> ThrowHelper.ThrowInvalidOperationException(resource, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
1286=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType);
1291=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);