Ejemplo n.º 1
0
        public VoidMethodObjectSourceProxy(object source, MethodInfo methodInfo) : base(source)
        {
            if (!methodInfo.ReturnType.Equals(typeof(void)))
            {
                throw new ArgumentException("methodInfo");
            }

            this.invoker = methodInfo.AsProxy(source);
        }
Ejemplo n.º 2
0
        public VoidMethodTargetProxy(object target, MethodInfo methodInfo)
        {
            if (!methodInfo.ReturnType.Equals(typeof(void)))
            {
                throw new ArgumentException("methodInfo");
            }

            if (target != null)
            {
                this.target = new WeakReference(target, true);
            }

            this.invoker = methodInfo.AsProxy(target);
        }