public ISecretsRepository GetNewSecretRepository() { if (RepositoryType == SecretsRepositoryType.BlobStorage) { return(new BlobStorageSecretsRepository(SecretsDirectory, BlobConnectionString, TestSiteName)); } else if (RepositoryType == SecretsRepositoryType.BlobStorageSas) { return(new BlobStorageSasSecretsRepository(SecretsDirectory, BlobSasConnectionUri.ToString(), TestSiteName)); } else if (RepositoryType == SecretsRepositoryType.FileSystem) { return(new FileSystemSecretsRepository(SecretsDirectory)); } else { return(new KeyVaultSecretsRepository(SecretsDirectory, KeyVaultName, KeyVaultConnectionString)); } }
public ISecretsRepository GetNewSecretRepository() { var logger = LoggerProvider.CreateLogger("Test"); if (RepositoryType == SecretsRepositoryType.BlobStorage) { return(new BlobStorageSecretsRepository(SecretsDirectory, ConnectionStringNames.Storage, TestSiteName, logger, Environment, AzureBlobStorageProvider)); } else if (RepositoryType == SecretsRepositoryType.BlobStorageSas) { return(new BlobStorageSasSecretsRepository(SecretsDirectory, BlobSasConnectionUri.ToString(), TestSiteName, logger, Environment, AzureBlobStorageProvider)); } else if (RepositoryType == SecretsRepositoryType.FileSystem) { return(new FileSystemSecretsRepository(SecretsDirectory, logger, Environment)); } else { return(new KeyVaultSecretsRepository(SecretsDirectory, KeyVaultUri, KeyVaultClientId, KeyVaultClientSecret, KeyVaultTenantId, logger, Environment)); } }