Esempio n. 1
0
            protected TargetedMethodWeaver(TargetedClassWeaver classWeaver, MethodDefinition method, string name, MethodDefinition staticConstructor, FieldReference target, FieldDefinition invocationHandler) : base(classWeaver, method, name, staticConstructor)
            {
                ClassWeaver = classWeaver;
                this.target = classWeaver.Target;
                if (classWeaver.ProxyType.GenericParameters.Any())
                {
                    this.target = target.Bind(classWeaver.ProxyType.MakeGenericInstanceType(classWeaver.ProxyType.GenericParameters.ToArray()));
                }

                this.invocationHandler = invocationHandler;
            }
Esempio n. 2
0
            protected TargetedMethodWeaver(TargetedClassWeaver classWeaver, MethodDefinition method, string name, MethodDefinition staticConstructor, FieldReference target, FieldDefinition invocationHandler) : base(classWeaver, method, name, staticConstructor)
            {
                ClassWeaver = classWeaver;
                this.target = classWeaver.Target;
                if (classWeaver.ProxyType.GenericParameters.Any())
                    this.target = target.Bind(classWeaver.ProxyType.MakeGenericInstanceType(classWeaver.ProxyType.GenericParameters.ToArray()));

                this.invocationHandler = invocationHandler;
            }