Example #1
0
        protected virtual void WeaveHandlerMethod(string methodName, IMethodScopeWeaver methodScopeWeaver, Type returnType)
        {
            var methodBuilder = typeBuilder.DefineMethod(methodName, methodAttr, callingConventions, returnType, methodParameters.Parameters);
            var ilGenerator   = methodBuilder.GetILGenerator();

            methodScopeWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Ret);
        }
        protected virtual void WeaveProceedMethod()
        {
            ILGenerator   ilGenerator      = null;
            MethodBuilder methodBuilder    = null;
            var           methodParameters = ResolveParameterTypes();

            methodBuilder = typeBuilder.DefineMethod("Proceed", methodAttr, callingConventions, methodParameters.ReturnType, methodParameters.Parameters);
            ilGenerator   = methodBuilder.GetILGenerator();
            methodScopeWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Ret);
        }
Example #3
0
        protected virtual void WeaveSetValueMethod()
        {
            ILGenerator   ilGenerator      = null;
            MethodBuilder methodBuilder    = null;
            var           methodParameters = ResolveParameterTypes(true);

            methodBuilder = typeBuilder.DefineMethod("SetValue", methodAttrs, callingConventions, typeof(void), methodParameters.Parameters);
            ilGenerator   = methodBuilder.GetILGenerator();
            setMethodScopeWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Ret);
        }
        protected virtual void WeaveHandlerMethod(string methodName, IMethodScopeWeaver methodScopeWeaver, Type returnType)
        {
            var methodBuilder = typeBuilder.DefineMethod(methodName, methodAttr, callingConventions, returnType, methodParameters.Parameters);
            var ilGenerator = methodBuilder.GetILGenerator();

            methodScopeWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Ret);
        }
 public override ILGenerator Weave(ILGenerator ilGenerator)
 {
     return(methodDecoratorScopeWeaver.Weave(ilGenerator));
 }
 public override void Weave(ILGenerator ilGenerator)
 {
     weaver.Weave(ilGenerator);
 }
 public override void Weave(ILGenerator ilGenerator)
 {
     methodDecoratorScopeWeaver.Weave(ilGenerator);
 }
Example #8
0
 public void WeaveMethodScope(ILGenerator ilGenerator)
 {
     methodScopeWeaver.Weave(ilGenerator);
 }