Exemple #1
0
        public async Task <(bool, string)> TryGetSitemapIdByPathAsync(string path)
        {
            var identifier = await _sitemapManager.GetIdentifierAsync();

            if (_document == null || _document.Identifier != identifier)
            {
                await BuildEntriesAsync(identifier);
            }

            if (_document.SitemapIds.TryGetValue(path, out var sitemapId))
            {
                return(true, sitemapId);
            }

            return(false, sitemapId);
        }