public AutoCompleteResourceV3(HttpSource client, ServiceIndexResourceV3 serviceIndex, RegistrationResourceV3 regResource) : base() { _regResource = regResource; _serviceIndex = serviceIndex; _client = client; }
/// <summary> /// Download packages using the download url found in the registration resource. /// </summary> public DownloadResourceV3(HttpSource client, RegistrationResourceV3 regResource) : this(client) { if (regResource == null) { throw new ArgumentNullException(nameof(regResource)); } _regResource = regResource; }
public PackageMetadataResourceV3( HttpSource client, RegistrationResourceV3 regResource, ReportAbuseResourceV3 reportAbuseResource, PackageDetailsUriResourceV3 packageDetailsUriResource) { _regResource = regResource; _client = client; _reportAbuseResource = reportAbuseResource; _packageDetailsUriResource = packageDetailsUriResource; }
public MetadataResourceV3(HttpSource client, RegistrationResourceV3 regResource) : base() { if (client == null) { throw new ArgumentNullException("client"); } if (regResource == null) { throw new ArgumentNullException("regResource"); } _regResource = regResource; _client = client; }
public override async Task <Tuple <bool, INuGetResource> > TryCreate(SourceRepository source, CancellationToken token) { RegistrationResourceV3 regResource = null; var serviceIndex = await source.GetResourceAsync <ServiceIndexResourceV3>(token); if (serviceIndex != null) { var baseUrl = serviceIndex[ServiceTypes.RegistrationsBaseUrl].FirstOrDefault(); var httpSourceResource = await source.GetResourceAsync <HttpSourceResource>(token); // construct a new resource regResource = new RegistrationResourceV3(httpSourceResource.HttpSource, baseUrl); } return(new Tuple <bool, INuGetResource>(regResource != null, regResource)); }
/// <summary> /// Dependency info resource /// </summary> /// <param name="client">Http client</param> /// <param name="regResource">Registration blob resource</param> public DependencyInfoResourceV3(HttpSource client, RegistrationResourceV3 regResource, SourceRepository source) { if (client == null) { throw new ArgumentNullException(nameof(client)); } if (regResource == null) { throw new ArgumentNullException(nameof(regResource)); } if (source == null) { throw new ArgumentNullException(nameof(source)); } _client = client; _regResource = regResource; _source = source; }
public MetadataResourceV3(RegistrationResourceV3 regResource) : base() { _regResource = regResource ?? throw new ArgumentNullException(nameof(regResource)); }
public DownloadResourceV3(HttpSource client, RegistrationResourceV3 regResource) : this(source : null, client, regResource) { }