Beispiel #1
0
        public static object ToAction(Type concreteType, MethodInfo method)
        {
            var objects = new MethodCallObjects(concreteType, method);

            Type openType = objects.ParameterCount == 1 ? typeof (Action<>) : typeof (Action<,>);
            return objects.BuildForOpenType(openType);
        }
Beispiel #2
0
        public static object ToAction(Type concreteType, MethodInfo method)
        {
            var objects = new MethodCallObjects(concreteType, method);

            Type openType = objects.ParameterCount == 1 ? typeof(Action <>) : typeof(Action <,>);

            return(objects.BuildForOpenType(openType));
        }
Beispiel #3
0
        public static object ToFunc(Type concreteType, MethodInfo method)
        {
            // TODO:  Blow up if there's more than one input argument
            // TODO:  Blow up if there's not an output

            var objects = new MethodCallObjects(concreteType, method);

            Type openType = objects.ParameterCount == 2 ? typeof (Func<,>) : typeof (Func<,,>);
            return objects.BuildForOpenType(openType);
        }
Beispiel #4
0
        public static object ToAction(Type concreteType, MethodInfo method)
        {
            // TODO:  Blow up if there's more than one input argument
            // TODO:  Blow up if there is an output

            var objects = new MethodCallObjects(concreteType, method);

            Type openType = objects.ParameterCount == 1 ? typeof(Action <>) : typeof(Action <,>);

            return(objects.BuildForOpenType(openType));
        }