private DockerRegistryClient(string registry, ServiceClientCredentials?serviceClientCredentials, HttpClient?httpClient, bool disposeHttpClient, HttpClientHandler?rootHandler, params DelegatingHandler[] handlers) : base(httpClient, disposeHttpClient) { this.InitializeHttpClient(httpClient, rootHandler, handlers.Append(new OAuthDelegatingHandler()).ToArray()); this.Registry = registry ?? throw new ArgumentNullException(nameof(registry)); this.BaseUri = new Uri($"https://{this.Registry}"); this.credentials = serviceClientCredentials; serviceClientCredentials?.InitializeServiceClient(this); this.Blobs = new BlobOperations(this); this.Catalog = new CatalogOperations(this); this.Tags = new TagOperations(this); this.Manifests = new ManifestOperations(this); }
public static async Task <ManifestInfo> GetAsync(this IManifestOperations operations, string repositoryName, string tagOrDigest, CancellationToken cancellationToken = default) { var response = await operations.GetWithHttpMessagesAsync(repositoryName, tagOrDigest, cancellationToken).ConfigureAwait(false); return(response.GetBodyAndDispose()); }