public override async Task<Tuple<bool, INuGetResource>> TryCreate(SourceRepository source, CancellationToken token)
        {
            DownloadResource DownloadResourceV2 = null;

            var v2repo = await GetRepository(source, token);

            if (v2repo != null)
            {
                DownloadResourceV2 = new DownloadResourceV2(v2repo);
            }

            return new Tuple<bool, INuGetResource>(DownloadResourceV2 != null, DownloadResourceV2);
        }
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            DownloadResource DownloadResourceV2 = null;

            var v2repo = await GetRepository(source, token);

            if (v2repo != null)
            {
                DownloadResourceV2 = new DownloadResourceV2(v2repo);
            }

            return(new Tuple <bool, INuGetResource>(DownloadResourceV2 != null, DownloadResourceV2));
        }
示例#3
0
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            DownloadResource DownloadResourceV2 = null;

            if (FeedTypeUtility.GetFeedType(source.PackageSource) == FeedType.FileSystem)
            {
                var v2repo = await GetRepository(source, token);

                if (v2repo != null)
                {
                    DownloadResourceV2 = new DownloadResourceV2(v2repo);
                }
            }

            return(new Tuple <bool, INuGetResource>(DownloadResourceV2 != null, DownloadResourceV2));
        }