BlackHole.Slave.Helper.RegistryHelper.GetFormattedKeyValues C# (CSharp) Method

GetFormattedKeyValues() public static method

public static GetFormattedKeyValues ( this key ) : IEnumerable
key this
return IEnumerable
        public static IEnumerable<string> GetFormattedKeyValues(this RegistryKey key)
        {
            if (key == null)
                yield break;

            foreach (var k in key.GetValueNames()
                .Where(keyVal => !keyVal.IsNameOrValueNull(key))
                .Where(k => !string.IsNullOrEmpty(k)))            
                yield return $"{k}||{key.GetValueSafe(k)}";            
        }
    }