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

            // Assert
            formattedString.ShouldBeEquivalentTo(expectedOutput);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 private KeyValuePair <string, string> Inject(KeyValuePair <string, string> pair) =>
 new KeyValuePair <string, string>(pair.Key, _secretInjector.InjectAsync(pair.Value).Result);
Exemplo n.º 4
0
 private string Inject(string key)
 {
     return(_secretInjector.InjectAsync(key).Result);
 }
Exemplo n.º 5
0
        protected override Task <string> Get(string key)
        {
            var setting = ConfigurationManager.AppSettings[key];

            return(_secretInjector.InjectAsync(setting));
        }
Exemplo n.º 6
0
 private Task <string> Inject(string value)
 {
     return(_secretInjector.InjectAsync(value));
 }
 protected override Task <string> Get(string key)
 {
     return(_secretInjector.InjectAsync(GetEnvironmentSettingValue(key)));
 }