in src/React.Core/TinyIoC/TinyIoC.cs [3677:3705]
private bool IsAutomaticLazyFactoryRequest(Type type)
{
if (!type.IsGenericType())
return false;
Type genericType = type.GetGenericTypeDefinition();
// Just a func
if (genericType == typeof(Func<>))
return true;
// 2 parameter func with string as first parameter (name)
//#if NETFX_CORE
// if ((genericType == typeof(Func<,>) && type.GetTypeInfo().GenericTypeArguments[0] == typeof(string)))
//#else
if ((genericType == typeof(Func<,>) && type.GetGenericArguments()[0] == typeof(string)))
//#endif
return true;
// 3 parameter func with string as first parameter (name) and IDictionary<string, object> as second (parameters)
//#if NETFX_CORE
// if ((genericType == typeof(Func<,,>) && type.GetTypeInfo().GenericTypeArguments[0] == typeof(string) && type.GetTypeInfo().GenericTypeArguments[1] == typeof(IDictionary<String, object>)))
//#else
if ((genericType == typeof(Func<,,>) && type.GetGenericArguments()[0] == typeof(string) && type.GetGenericArguments()[1] == typeof(IDictionary<String, object>)))
//#endif
return true;
return false;
}