/// <summary> /// Initializes a new instance of the <see cref="KeyVaultClientCreator"/> class. /// </summary> /// <param name="keyVaultConfigOptions"><see cref="IOptions{TOptions}"/> which should be registered on the service, and contain the Key Vault authorization info.</param> public KeyVaultClientCreator(IOptions <KeyVaultConfig> keyVaultConfigOptions) { Requires.NotNull(keyVaultConfigOptions, nameof(keyVaultConfigOptions)); Requires.NotNull(keyVaultConfigOptions.Value, $"{nameof(keyVaultConfigOptions)}.Value"); keyVaultConfig = keyVaultConfigOptions.Value; }
/// <summary> /// Initializes a new instance of the <see cref="KeyVaultRepository"/> class. /// </summary> /// <param name="keyVaultClientCreator">Implementation of <see cref="IKeyVaultClientCreator"/> which is used to create a Key Vault Client.</param> /// <param name="keyVaultConfigOptions"><see cref="IOptions{TOptions}"/> which should be registered on the service, and contain the Key Vault authorization info.</param> public KeyVaultRepository(IKeyVaultClientCreator keyVaultClientCreator, IOptions <KeyVaultConfig> keyVaultConfigOptions) { Requires.NotNull(keyVaultClientCreator, nameof(keyVaultClientCreator)); Requires.NotNull(keyVaultConfigOptions, nameof(keyVaultConfigOptions)); Requires.NotNull(keyVaultConfigOptions.Value, $"{nameof(keyVaultConfigOptions)}.Value"); this.keyVaultClientCreator = keyVaultClientCreator; keyVaultConfig = keyVaultConfigOptions.Value; }