Esempio n. 1
0
        public IInvokable RegisterInvokable(InvokableInfo info, MethodInfo methodInfo, object instance = null)
        {
            IInvokable invokable = InvokableFactory.MakeInvokable(info, methodInfo, instance);

            RegisterInvokable(invokable);
            return(invokable);
        }
Esempio n. 2
0
        public IInvokable RegisterInvokable(InvokableInfo info, EventInfo eventInfo, object instance = null)
        {
            IInvokable invokable = InvokableFactory.MakeInvokable(info, eventInfo, instance);

            RegisterInvokable(invokable);
            return(invokable);
        }
Esempio n. 3
0
        public IInvokable RegisterInvokable(InvokableInfo info, Delegate del)
        {
            IInvokable invokable = InvokableFactory.MakeInvokable(info, del);

            RegisterInvokable(invokable);
            return(invokable);
        }
Esempio n. 4
0
        public InvokableEvent(InvokableInfo info, EventInfo eventInfo, FieldInfo fieldInfo, WeakReference instance)
            : base(info, fieldInfo.DeclaringType, fieldInfo.ReflectedType.Assembly, instance, fieldInfo.IsPublic)
        {
            this.fieldInfo  = fieldInfo;
            methodSignature = "[Unknown]";
            MethodInfo method = eventInfo.EventHandlerType.GetMethod("Invoke");

            SetParameters(method.GetParameters());
            methodSignature = method.GetSignature();
        }
Esempio n. 5
0
 public static IInvokable MakeInvokableFromBackingEventField(InvokableInfo info, EventInfo eventInfo, FieldInfo fieldInfo, object instance)
 {
     return(new InvokableEvent(info, eventInfo, fieldInfo, (instance == null) ? null : new WeakReference(instance)));
 }
Esempio n. 6
0
 public static IInvokable MakeInvokable(InvokableInfo info, MethodInfo methodInfo, object instance)
 {
     return(new InvokableMethod(info, methodInfo, (instance == null) ? null : new WeakReference(instance)));
 }
Esempio n. 7
0
        public static IInvokable MakeInvokable(InvokableInfo info, EventInfo eventInfo, object instance)
        {
            FieldInfo backingEventField = GetBackingEventField(eventInfo, instance);

            return(MakeInvokableFromBackingEventField(info, eventInfo, backingEventField, instance));
        }
Esempio n. 8
0
 public static IInvokable MakeInvokable(InvokableInfo info, Delegate del)
 {
     return(new InvokableMethod(info, del));
 }
Esempio n. 9
0
 public InvokableMethod(InvokableInfo info, Delegate methodDelegate)
     : base(info, methodDelegate.Method.DeclaringType, methodDelegate.Method.ReflectedType.Assembly, (methodDelegate.Target == null) ? null : new WeakReference(methodDelegate.Target), methodDelegate.Method.IsPublic, methodDelegate.Method.GetParameters())
 {
     methodInfo      = methodDelegate.Method;
     methodSignature = methodInfo.GetSignature();
 }
Esempio n. 10
0
 public InvokableMethod(InvokableInfo info, MethodInfo methodInfo, WeakReference instance)
     : base(info, methodInfo.DeclaringType, methodInfo.ReflectedType.Assembly, instance, methodInfo.IsPublic, methodInfo.GetParameters())
 {
     this.methodInfo = methodInfo;
     methodSignature = methodInfo.GetSignature();
 }
Esempio n. 11
0
 public BaseInvokable(InvokableInfo info, Type declaringType, Assembly assembly, WeakReference instance, bool isPublic)
     : base(info, assembly, instance, isPublic)
 {
     this.declaringType = declaringType;
     InvokableInfo      = info;
 }
Esempio n. 12
0
 public BaseInvokable(InvokableInfo info, Type declaringType, Assembly assembly, WeakReference instance, bool isPublic, ParameterInfo[] parameters)
     : this(info, declaringType, assembly, instance, isPublic)
 {
     this.declaringType = declaringType;
     SetParameters(parameters);
 }