public async Task TestFormat(string input, string expectedOutput)
        {
            // Act
            string formattedString = await _secretInjector.InjectAsync(input);

            // Assert
            formattedString.ShouldBeEquivalentTo(expectedOutput);
        }
Пример #2
0
        public bool TryGet(string key, out string value)
        {
            if (_originalProvider.TryGet(key, out value))
            {
                value = _secretInjector.InjectAsync(value).ConfigureAwait(false).GetAwaiter().GetResult();
                return(true);
            }

            return(false);
        }
Пример #3
0
 private KeyValuePair <string, string> Inject(KeyValuePair <string, string> pair) =>
 new KeyValuePair <string, string>(pair.Key, _secretInjector.InjectAsync(pair.Value).Result);
Пример #4
0
 private string Inject(string key)
 {
     return(_secretInjector.InjectAsync(key).Result);
 }
Пример #5
0
        protected override Task <string> Get(string key)
        {
            var setting = ConfigurationManager.AppSettings[key];

            return(_secretInjector.InjectAsync(setting));
        }
Пример #6
0
 private Task <string> Inject(string value)
 {
     return(_secretInjector.InjectAsync(value));
 }
 protected override Task <string> Get(string key)
 {
     return(_secretInjector.InjectAsync(GetEnvironmentSettingValue(key)));
 }