Esempio n. 1
0
        public static R Invoke <T, P0, P1, P2, P3, R>(this Polymorphic <Func <T, P0, P1, P2, P3, R> > polymorphic, T instance, P0 p0, P1 p1, P2 p2, P3 p3)
        {
            var func = polymorphic.GetValue(instance.GetType());

            return(func(instance, p0, p1, p2, p3));
        }
Esempio n. 2
0
        public static R Invoke <T, P0, R>(this Polymorphic <Func <T, P0, R> > polymorphic, T instance, P0 p0)
        {
            var func = polymorphic.GetValue(instance.GetType());

            return(func(instance, p0));
        }
Esempio n. 3
0
        public static void Invoke <T, P0, P1>(this Polymorphic <Action <T, P0, P1> > polymorphic, T instance, P0 p0, P1 p1)
        {
            var action = polymorphic.GetValue(instance.GetType());

            action(instance, p0, p1);
        }
Esempio n. 4
0
        public static void Invoke <T, P0, P1, P2, P3>(this Polymorphic <Action <T, P0, P1, P2, P3> > polymorphic, T instance, P0 p0, P1 p1, P2 p2, P3 p3)
        {
            var action = polymorphic.GetValue(instance.GetType());

            action(instance, p0, p1, p2, p3);
        }
Esempio n. 5
0
        public static void Invoke <T>(this Polymorphic <Action <T> > polymorphic, T instance)
        {
            var action = polymorphic.GetValue(instance.GetType());

            action(instance);
        }