Esempio n. 1
0
        public static Func <object> CreateFactory(Type type)
        {
            if (type.IsGenericType)
            {
                Type genericType = type.GetGenericTypeDefinition();
                if (genericType == typeof(IList <>))
                {
                    Type createType = typeof(List <>).MakeGenericType(type.GetGenericArguments()[0]);

                    return(() => FastActivator.Create(createType));
                }
            }

            return(() => FastActivator.Create(type));
        }
Esempio n. 2
0
 T IFastActivator <T> .Create <TArg0, TArg1>(TArg0 arg0, TArg1 arg1)
 {
     return(FastActivator <T, TArg0, TArg1> .Create(arg0, arg1));
 }
Esempio n. 3
0
 public static T Create <TArg0, TArg1>(TArg0 arg0, TArg1 arg1)
 {
     return(FastActivator <T, TArg0, TArg1> .Create(arg0, arg1));
 }
Esempio n. 4
0
 T IFastActivator <T> .Create <TArg0>(TArg0 arg0)
 {
     return(FastActivator <T, TArg0> .Create(arg0));
 }
Esempio n. 5
0
 public static T Create <TArg0>(TArg0 arg0)
 {
     return(FastActivator <T, TArg0> .Create(arg0));
 }