상속: IMethodScopeWeaver
예제 #1
0
        protected override void WeaveFunction(ILGenerator ilGenerator)
        {
            var setReturnValueWeaver = new SetReturnValueWeaver(topAspectInScopeArgType);
            var argsImplLocalBuilder = localBuilderRepository.Get(topAspectInScopeArgType);

            byRefArgumentStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadLocal(argsImplLocalBuilder);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, Method);
            setReturnValueWeaver.Weave(ilGenerator);
            byRefArgumentStoreWeaver.RestoreArgsIfNeeded(ilGenerator);
        }
예제 #2
0
        protected override void WeaveFunction(ILGenerator ilGenerator)
        {
            var setReturnValueWeaver = new SetReturnValueWeaver(topAspectInScopeArgType);
            var argsImplLocalBuilder = localBuilderRepository.Get(topAspectInScopeArgType);

            byRefArgumentStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadLocal(argsImplLocalBuilder);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, Method);
            setReturnValueWeaver.Weave(ilGenerator);
            byRefArgumentStoreWeaver.RestoreArgsIfNeeded(ilGenerator);
        }
예제 #3
0
        protected override ILGenerator WeaveFunction(ILGenerator ilGenerator)
        {
            var setReturnValueWeaver = new SetReturnValueWeaver(previousAspectArgsType);
            var argsImplLocalBuilder = localBuilderRepository.Get(previousAspectArgsType);

            byRefArgumentStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadLocal(argsImplLocalBuilder);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, MethodInfoImpl);
            setReturnValueWeaver.Weave(ilGenerator);
            byRefArgumentStoreWeaver.RestoreArgsIfNeeded(ilGenerator);

            return(ilGenerator);
        }
예제 #4
0
        protected override void WeaveFunction(ILGenerator ilGenerator)
        {
            var aspectArgumentContract = method.ToAspectArgumentContract();
            var setReturnValueWeaver   = new SetReturnValueWeaver(aspectArgumentContract);
            var returnValueGetMethod   = aspectArgumentContract.GetProperty("ReturnValue");

            byRefArgumentsStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadArg(2);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, method);
            setReturnValueWeaver.Weave(ilGenerator);
            byRefArgumentsStoreWeaver.RestoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadArg(2);
            ilGenerator.Emit(OpCodes.Callvirt, returnValueGetMethod.GetGetMethod());
        }
예제 #5
0
        protected override void WeaveFunction(ILGenerator ilGenerator)
        {
            var aspectArgumentContract = method.ToAspectArgumentContract();
            var setReturnValueWeaver = new SetReturnValueWeaver(aspectArgumentContract);
            var returnValueGetMethod = aspectArgumentContract.GetProperty("ReturnValue");

            byRefArgumentsStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadArg(2);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, method);
            setReturnValueWeaver.Weave(ilGenerator);
            byRefArgumentsStoreWeaver.RestoreArgsIfNeeded(ilGenerator);
            ilGenerator.EmitLoadArg(2);
            ilGenerator.Emit(OpCodes.Callvirt, returnValueGetMethod.GetGetMethod());
        }