Stubble.Core.Context.GetValueFromRegistry C# (CSharp) Method

GetValueFromRegistry() private method

Gets a value from the registry using the initalized value getters
private GetValueFromRegistry ( object value, string key ) : object
value object The value to lookup the value within
key string The key to lookup in the value
return object
        private object GetValueFromRegistry(object value, string key)
        {
            foreach (var entry in Registry.ValueGetters)
            {
                if (!entry.Key.IsInstanceOfType(value))
                {
                    continue;
                }

                var outputVal = entry.Value(value, key);
                if (outputVal != null)
                {
                    return outputVal;
                }
            }

            return null;
        }