Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
annelo-msft committed May 4, 2021
1 parent 4ac1a47 commit 2d65b17
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -176,20 +176,20 @@ internal static string ParseUriReferenceFromLinkHeader(string linkValue)
}

/// <summary> Delete the repository identified by `repostitory`. </summary>
/// <param name="repository"> Repository name (including the namespace). </param>
/// <param name="repositoryName"> Repository name (including the namespace). </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repository"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="repository"/> is empty. </exception>
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repositoryName"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="repositoryName"/> is empty. </exception>
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
public virtual async Task<Response<DeleteRepositoryResult>> DeleteRepositoryAsync(string repository, CancellationToken cancellationToken = default)
public virtual async Task<Response<DeleteRepositoryResult>> 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)
{
Expand All @@ -199,20 +199,20 @@ public virtual async Task<Response<DeleteRepositoryResult>> DeleteRepositoryAsyn
}

/// <summary> Delete the repository identified by `repostitory`. </summary>
/// <param name="repository"> Repository name (including the namespace). </param>
/// <param name="repositoryName"> Repository name (including the namespace). </param>
/// <param name="cancellationToken"> The cancellation token to use. </param>
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repository"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="repository"/> is empty. </exception>
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repositoryName"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="repositoryName"/> is empty. </exception>
/// <exception cref="RequestFailedException">Thrown when a failure is returned by the Container Registry service.</exception>
public virtual Response<DeleteRepositoryResult> DeleteRepository(string repository, CancellationToken cancellationToken = default)
public virtual Response<DeleteRepositoryResult> 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)
{
Expand All @@ -224,17 +224,17 @@ public virtual Response<DeleteRepositoryResult> DeleteRepository(string reposito
/// <summary>
/// Create a new <see cref="ContainerRepository"/> object for the specified repository.
/// </summary>
/// <param name="name"> The name of the repository to reference. </param>
/// <param name="repositoryName"> The name of the repository to reference. </param>
/// <returns> A new <see cref="ContainerRepository"/> for the desired repository. </returns>
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="name"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="name"/> is empty. </exception>
public virtual ContainerRepository GetRepository(string name)
/// <exception cref="ArgumentNullException"> Thrown when <paramref name="repositoryName"/> is null. </exception>
/// <exception cref="ArgumentException"> Thrown when <paramref name="repositoryName"/> is empty. </exception>
public virtual ContainerRepository GetRepository(string repositoryName)
{
Argument.AssertNotNullOrEmpty(name, nameof(name));
Argument.AssertNotNullOrEmpty(repositoryName, nameof(repositoryName));

return new ContainerRepository(
_registryUri,
name,
repositoryName,
_clientDiagnostics,
_restClient);
}
Expand Down

0 comments on commit 2d65b17

Please sign in to comment.