private async Task ClearAllKeyVaultSecrets() { var secretsPages = KeyVaultSecretsRepository.GetKeyVaultSecretsPagesAsync(SecretClient).AsPages(); await foreach (Page <SecretProperties> page in secretsPages) { foreach (SecretProperties item in page.Values) { await SecretClient.StartDeleteSecretAsync(item.Name); } } }
private async Task ClearAllKeyVaultSecrets() { var secretsPages = await KeyVaultSecretsRepository.GetKeyVaultSecretsPagesAsync(KeyVaultClient, GetKeyVaultBaseUrl()); foreach (IPage <SecretItem> secretsPage in secretsPages) { foreach (SecretItem item in secretsPage) { await KeyVaultClient.DeleteSecretAsync(GetKeyVaultBaseUrl(), item.Identifier.Name); } } }