コード例 #1
0
ファイル: XRefArchiveBuilder.cs プロジェクト: xuan2261/docfx
        private async Task <string> DownloadCoreAsync(Uri uri, XRefArchive xa, bool isMajor)
        {
            IXRefContainer container;

            container = await _downloader.DownloadAsync(uri);

            if (!(container is XRefMap map))
            {
                // not support download an xref archive, or reference to an xref archive
                return(null);
            }
            if (map.Redirections?.Count > 0)
            {
                await RewriteRedirections(uri, xa, map);
            }
            if (map.References?.Count > 0 && map.HrefUpdated != true)
            {
                if (string.IsNullOrEmpty(map.BaseUrl))
                {
                    XRefMapDownloader.UpdateHref(map, uri);
                }
            }
            lock (_syncRoot)
            {
                if (isMajor)
                {
                    return(xa.CreateMajor(map));
                }
                else
                {
                    return(xa.CreateMinor(map, GetNames(uri, map)));
                }
            }
        }
コード例 #2
0
ファイル: XRefCollection.cs プロジェクト: diev/dotnet-docfx
 public ReaderCreator(ImmutableList <Uri> uris, int maxParallelism, string baseFolder)
 {
     _uris       = uris;
     _downloader = new XRefMapDownloader(baseFolder, maxParallelism);
 }
コード例 #3
0
ファイル: XRefCollection.cs プロジェクト: xuan2261/docfx
 public ReaderCreator(ImmutableList <Uri> uris, int maxParallelism, string baseFolder, IReadOnlyList <string> fallbackFolders)
 {
     _uris       = uris;
     _downloader = new XRefMapDownloader(baseFolder, fallbackFolders, maxParallelism);
 }
コード例 #4
0
ファイル: XRefCollection.cs プロジェクト: dotnet/docfx
 public ReaderCreator(ImmutableList<Uri> uris, int maxParallelism, string baseFolder)
 {
     _uris = uris;
     _downloader = new XRefMapDownloader(baseFolder, maxParallelism);
 }
コード例 #5
0
ファイル: XRefCollection.cs プロジェクト: stuartleeks/docfx
 public ReaderCreator(ImmutableList <Uri> uris, int maxParallelism)
 {
     _uris       = uris;
     _downloader = new XRefMapDownloader(maxParallelism);
 }