Beispiel #1
0
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            DependencyInfoResource DependencyInfoResourceV2 = null;
            var v2repo = await GetRepository(source, token);

            if (v2repo != null)
            {
                DependencyInfoResourceV2 = new DependencyInfoResourceV2(v2repo, source);
            }

            return(Tuple.Create <bool, INuGetResource>(DependencyInfoResourceV2 != null, DependencyInfoResourceV2));
        }
        public override async Task<Tuple<bool, INuGetResource>> TryCreate(SourceRepository source, CancellationToken token)
        {
            DependencyInfoResource DependencyInfoResourceV2 = null;
            var v2repo = await GetRepository(source, token);

            if (v2repo != null)
            {
                DependencyInfoResourceV2 = new DependencyInfoResourceV2(v2repo, source);
            }

            return Tuple.Create<bool, INuGetResource>(DependencyInfoResourceV2 != null, DependencyInfoResourceV2);
        }
        public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            DependencyInfoResource DependencyInfoResourceV2 = null;

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

                if (v2repo != null)
                {
                    DependencyInfoResourceV2 = new DependencyInfoResourceV2(v2repo, source);
                }
            }

            return(Tuple.Create <bool, INuGetResource>(DependencyInfoResourceV2 != null, DependencyInfoResourceV2));
        }