Microsoft.Azure.Commands.KeyVault.GetAzureKeyVaultSecret.GetAndWriteSecretVersions C# (CSharp) Method

GetAndWriteSecretVersions() private method

private GetAndWriteSecretVersions ( string vaultName, string name, string currentSecretVersion ) : void
vaultName string
name string
currentSecretVersion string
return void
        private void GetAndWriteSecretVersions(string vaultName, string name, string currentSecretVersion)
        {
            var options = new KeyVaultObjectFilterOptions
            {
                VaultName = vaultName,
                Name = name,
                NextLink = null
            };

            do
            {
                var secrets = DataServiceClient.GetSecretVersions(options).Where(s => s.Version != currentSecretVersion);
                WriteObject(secrets, true);
            } while (!string.IsNullOrEmpty(options.NextLink));
        }
    }