public static async Task <string> GetSecretAsync(this ISecret secret, string key)
        {
            var pairs = await secret.GetSecretAsync();

            var dictionary = pairs.FromJson <Dictionary <string, string> >();

            return(dictionary[key]);
        }
Ejemplo n.º 2
0
        public async Task <string> GetSecretAsync()
        {
            if (string.IsNullOrEmpty(savedSecret))
            {
                savedSecret = await inner.GetSecretAsync();

                inner = null; // dont need inner anymore let's free up some memory
            }

            return(savedSecret);
        }