/// <summary> List the tags that uniquely identify this artifact and the properties of each. </summary> /// <param name="tagOrder"> Requested order of tags in the collection. </param> /// <param name="cancellationToken"> The cancellation token to use. </param> /// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception> public virtual Pageable <ArtifactTagProperties> GetAllTagProperties(ArtifactTagOrder tagOrder = ArtifactTagOrder.None, CancellationToken cancellationToken = default) { Page <ArtifactTagProperties> FirstPageFunc(int?pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RegistryArtifact)}.{nameof(GetAllTagProperties)}"); scope.Start(); try { string digest = GetDigest(cancellationToken); string order = tagOrder == ArtifactTagOrder.None ? null : tagOrder.ToSerialString(); var response = _restClient.GetTags(_repositoryName, last: null, n: pageSizeHint, orderby: order, digest: digest, cancellationToken: cancellationToken); return(Page.FromValues(response.Value.Tags, response.Headers.Link, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } Page <ArtifactTagProperties> NextPageFunc(string nextLink, int?pageSizeHint) { using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(RegistryArtifact)}.{nameof(GetAllTagProperties)}"); scope.Start(); try { string digest = GetDigest(cancellationToken); string order = tagOrder == ArtifactTagOrder.None ? null : tagOrder.ToSerialString(); string uriReference = ContainerRegistryClient.ParseUriReferenceFromLinkHeader(nextLink); var response = _restClient.GetTagsNextPage(uriReference, _repositoryName, last: null, n: null, orderby: order, digest: digest, cancellationToken); return(Page.FromValues(response.Value.Tags, response.Headers.Link, response.GetRawResponse())); } catch (Exception e) { scope.Failed(e); throw; } } return(PageableHelpers.CreateEnumerable(FirstPageFunc, NextPageFunc)); }