コード例 #1
0
 protected override void WeaveAction(ILGenerator ilGenerator)
 {
     byRefArgumentStoreWeaver.StoreArgsIfNeeded(ilGenerator);
     argumentsWeaver.Weave(ilGenerator);
     ilGenerator.Emit(OpCodes.Callvirt, Method);
     byRefArgumentStoreWeaver.RestoreArgsIfNeeded(ilGenerator);
 }
コード例 #2
0
        protected override ILGenerator WeaveAction(ILGenerator ilGenerator)
        {
            var aspectArgumentContract = methodInfoImpl.ToAspectArgumentContract();

            byRefArgumentsStoreWeaver.StoreArgsIfNeeded(ilGenerator);
            argumentsWeaver.Weave(ilGenerator);
            ilGenerator.Emit(OpCodes.Callvirt, methodInfoImpl);
            byRefArgumentsStoreWeaver.RestoreArgsIfNeeded(ilGenerator);

            return(ilGenerator);
        }
コード例 #3
0
        public override void Weave(ILGenerator ilGenerator)
        {
            LocalBuilder bindingLocalBuilder   = null;
            var          bindingsReflectedType = bindingDependency.ReflectedType;

            bindingLocalBuilder = ilGenerator.DeclareLocal(bindingsReflectedType);
            localBuilderRepository.Add(bindingLocalBuilder);
            argumentsWeaver.Weave(ilGenerator);
            weaver.Weave(ilGenerator);
        }
コード例 #4
0
        public override void Weave(ILGenerator ilGenerator)
        {
            var propertyArgumentContract         = property.ToPropertyArgumentContract();
            var propertyArgumentContractProperty = propertyArgumentContract.GetProperty("Value");

            argumentsWeaver.Weave(ilGenerator);
            weaver.Weave(ilGenerator);
            ilGenerator.EmitLoadArg(2);
            ilGenerator.Emit(OpCodes.Callvirt, propertyArgumentContractProperty.GetGetMethod());
        }
コード例 #5
0
        public override void Weave(ILGenerator ilGenerator)
        {
            LocalBuilder aspectArgLocalBuilder = null;
            var          argumentType          = argumentsWeavingSettings.ArgumentType;
            var          valueProperty         = argumentType.GetProperty("Value");

            argumentsWeaver.Weave(ilGenerator);
            weaver.Weave(ilGenerator);
            aspectArgLocalBuilder = localBuilderRepository.Get(argumentType);
            ilGenerator.EmitLoadLocal(aspectArgLocalBuilder);
            ilGenerator.Emit(OpCodes.Callvirt, valueProperty.GetGetMethod());
        }
コード例 #6
0
        public override void Weave(ILGenerator ilGenerator)
        {
            var aspectArgsType = aspectMethodDefinition.Member.ToAspectArgumentContract();

            argumentsWeaver.Weave(ilGenerator);
            weaver.Weave(ilGenerator);

            if (argumentsWeavingSettings.IsFunction())
            {
                var returnValueProperty = aspectArgsType.GetProperty("ReturnValue");

                ilGenerator.EmitLoadArg(2);
                ilGenerator.Emit(OpCodes.Callvirt, returnValueProperty.GetGetMethod());
            }
        }
コード例 #7
0
        public override ILGenerator Weave(ILGenerator ilGenerator)
        {
            var isFunction     = argumentsWeavingSetings.IsFunction;
            var aspectArgsType = weavingSettings.MethodInfoImpl.ToAspectArgumentContract();

            argumentsWeaver.Weave(ilGenerator);
            weaver.Weave(ilGenerator);

            if (argumentsWeavingSetings.IsFunction)
            {
                var returnValueProperty = aspectArgsType.GetProperty("ReturnValue");

                ilGenerator.EmitLoadArg(2);
                ilGenerator.Emit(OpCodes.Callvirt, returnValueProperty.GetGetMethod());
            }

            return(ilGenerator);
        }
コード例 #8
0
 public override void Weave(ILGenerator ilGenerator)
 {
     argumentsWeaver.Weave(ilGenerator);
     weaver.Weave(ilGenerator);
 }
コード例 #9
0
        public override ILGenerator Weave(ILGenerator ilGenerator)
        {
            argumentsWeaver.Weave(ilGenerator);

            return(weaver.Weave(ilGenerator));
        }
コード例 #10
0
 public override void Weave(ILGenerator ilGenerator)
 {
     argumentsWeaver.Weave(ilGenerator);
     ilGenerator.EmitLoadArg(3);
     ilGenerator.Emit(OpCodes.Callvirt, Method);
 }