コード例 #1
0
        public override Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token)
        {
            HttpHandlerResourceV3 curResource = null;

#if !DNXCORE50
            // Everyone gets a dataclient
            var HttpHandler = TryGetCredentialAndProxy(source.PackageSource) ?? DataClient.DefaultHandler;
            curResource = new HttpHandlerResourceV3(HttpHandler);
#endif

            return(Task.FromResult(new Tuple <bool, INuGetResource>(curResource != null, curResource)));
        }
コード例 #2
0
        public override async Task<Tuple<bool, INuGetResource>> TryCreate(SourceRepository source, CancellationToken token)
        {
            HttpHandlerResourceV3 curResource = null;

#if !DNXCORE50
			// Everyone gets a dataclient
			var HttpHandler = TryGetCredentialAndProxy(source.PackageSource) ?? DataClient.DefaultHandler;
            curResource = new HttpHandlerResourceV3(HttpHandler);
#endif

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