System\Text\Json\Writer\Utf8JsonWriter.cs (7)
257if (_options.MaxDepth == 0)
617if (CurrentDepth >= _options.MaxDepth)
711Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1151Debug.Assert(indent <= _indentLength * _options.MaxDepth);
1280=> ThrowHelper.ThrowInvalidOperationException(resource, currentDepth: default, maxDepth: _options.MaxDepth, token: default, _tokenType);
1285=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.MismatchedObjectArray, currentDepth: default, maxDepth: _options.MaxDepth, token, _tokenType);
1290=> ThrowHelper.ThrowInvalidOperationException(ExceptionResource.DepthTooLarge, _currentDepth, _options.MaxDepth, token: default, tokenType: default);