Exemplo n.º 1
0
        private void Initialize(object obj, VaultBase client)
        {
            var properties = obj.GetType().GetProperties(BindingFlags.Instance | BindingFlags.Public);

            foreach (var property in properties.Where(p => p.CanWrite))
            {
                property.SetValue(obj, client.GetSecret(property).Value);
            }
        }
Exemplo n.º 2
0
 private Vault()
 {
     _client        = new VaultBase();
     _coreVaultBase = new CoreVaultBase();
     try
     {
         Initialize();
     }
     catch (AggregateException aex)
     {
         throw aex?.InnerException ?? aex.Flatten()?.InnerException ?? aex;
     }
 }