From e97d7f31e10df96e3c9409a5cffa32ecd8a680f3 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 4 May 2021 09:50:24 -0700 Subject: [PATCH] Standardize on repositoryName parameter name in ContainerRegistryClient methods (#20832) * fix #20831 * update API listing --- ...ainers.ContainerRegistry.netstandard2.0.cs | 6 ++-- .../src/ContainerRegistryClient.cs | 36 +++++++++---------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs index ce13dc0ce09f..d98543655dd7 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/api/Azure.Containers.ContainerRegistry.netstandard2.0.cs @@ -91,10 +91,10 @@ public ContainerRegistryClient(System.Uri registryUri, Azure.Core.TokenCredentia public virtual string LoginServer { get { throw null; } } public virtual string Name { get { throw null; } } public virtual System.Uri RegistryUri { get { throw null; } } - public virtual Azure.Response DeleteRepository(string repository, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } - public virtual System.Threading.Tasks.Task> DeleteRepositoryAsync(string repository, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual Azure.Response DeleteRepository(string repositoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } + public virtual System.Threading.Tasks.Task> DeleteRepositoryAsync(string repositoryName, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.Containers.ContainerRegistry.RegistryArtifact GetArtifact(string repositoryName, string tagOrDigest) { throw null; } - public virtual Azure.Containers.ContainerRegistry.ContainerRepository GetRepository(string name) { throw null; } + public virtual Azure.Containers.ContainerRegistry.ContainerRepository GetRepository(string repositoryName) { throw null; } public virtual Azure.Pageable GetRepositoryNames(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } public virtual Azure.AsyncPageable GetRepositoryNamesAsync(System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; } } diff --git a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs index 5bbe9287b53d..3f831f81a558 100644 --- a/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs +++ b/sdk/containerregistry/Azure.Containers.ContainerRegistry/src/ContainerRegistryClient.cs @@ -176,20 +176,20 @@ internal static string ParseUriReferenceFromLinkHeader(string linkValue) } /// Delete the repository identified by `repostitory`. - /// Repository name (including the namespace). + /// Repository name (including the namespace). /// The cancellation token to use. - /// Thrown when is null. - /// Thrown when is empty. + /// Thrown when is null. + /// Thrown when is empty. /// Thrown when a failure is returned by the Container Registry service. - public virtual async Task> DeleteRepositoryAsync(string repository, CancellationToken cancellationToken = default) + public virtual async Task> DeleteRepositoryAsync(string repositoryName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(repository, nameof(repository)); + Argument.AssertNotNullOrEmpty(repositoryName, nameof(repositoryName)); using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ContainerRegistryClient)}.{nameof(DeleteRepository)}"); scope.Start(); try { - return await _restClient.DeleteRepositoryAsync(repository, cancellationToken).ConfigureAwait(false); + return await _restClient.DeleteRepositoryAsync(repositoryName, cancellationToken).ConfigureAwait(false); } catch (Exception e) { @@ -199,20 +199,20 @@ public virtual async Task> DeleteRepositoryAsyn } /// Delete the repository identified by `repostitory`. - /// Repository name (including the namespace). + /// Repository name (including the namespace). /// The cancellation token to use. - /// Thrown when is null. - /// Thrown when is empty. + /// Thrown when is null. + /// Thrown when is empty. /// Thrown when a failure is returned by the Container Registry service. - public virtual Response DeleteRepository(string repository, CancellationToken cancellationToken = default) + public virtual Response DeleteRepository(string repositoryName, CancellationToken cancellationToken = default) { - Argument.AssertNotNullOrEmpty(repository, nameof(repository)); + Argument.AssertNotNullOrEmpty(repositoryName, nameof(repositoryName)); using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ContainerRegistryClient)}.{nameof(DeleteRepository)}"); scope.Start(); try { - return _restClient.DeleteRepository(repository, cancellationToken); + return _restClient.DeleteRepository(repositoryName, cancellationToken); } catch (Exception e) { @@ -224,17 +224,17 @@ public virtual Response DeleteRepository(string reposito /// /// Create a new object for the specified repository. /// - /// The name of the repository to reference. + /// The name of the repository to reference. /// A new for the desired repository. - /// Thrown when is null. - /// Thrown when is empty. - public virtual ContainerRepository GetRepository(string name) + /// Thrown when is null. + /// Thrown when is empty. + public virtual ContainerRepository GetRepository(string repositoryName) { - Argument.AssertNotNullOrEmpty(name, nameof(name)); + Argument.AssertNotNullOrEmpty(repositoryName, nameof(repositoryName)); return new ContainerRepository( _registryUri, - name, + repositoryName, _clientDiagnostics, _restClient); }