public void Dispose()
        {
            if (_currentRendering != null)
            {
                _currentRendering.Dispose();

                _currentRendering = null;
            }
        }
        public string NavigateTo(TextReader reader, string referencesDirectory, AdornedRenderer renderer, 
            IAdornedReferenceResolverFactory referenceResolverFactory)
        {
            if (_currentRendering != null)
            {
                _currentRendering.Dispose();
            }

            _currentRendering = new AdornedBrowserRendering();

            IAdornedReferenceResolver resolver =
                referenceResolverFactory.CreateReferenceResolver(_currentRendering, referencesDirectory);

            _currentRendering.RenderWith(reader, resolver, renderer);

            return _currentRendering.DocumentFileName;
        }