public TryFinallyAspectWeaver(IEnumerable<IMethodScopeWeaver> tryWeavers, IEnumerable<IMethodScopeWeaver> finallyWeavers, IMethodScopeWeaver returnValueWeaver = null) { this.tryWeavers = tryWeavers; this.finallyWeavers = finallyWeavers; weavers = new List<IMethodScopeWeaver>(); this.returnValueWeaver = returnValueWeaver; }
internal AbstractMethodBindingWeaver(MethodInfo method, BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IMethodScopeWeaver methodScopeWeaver) { this.method = method; this.bindingSettings = bindingSettings; this.methodScopeWeaver = methodScopeWeaver; this.aspectWeavingSettings = aspectWeavingSettings; }
internal BindingMethodAspectDecoratorWeaver(IMethodAspectDefinition aspectDefinition, IAspectWeavingSettings aspectWeavingSettings, IArgumentsWeavingSettings argumentsWeavingSettings) : base(aspectDefinition.Member, aspectWeavingSettings.WeavingSettings) { var bindingSettings = aspectDefinition.ToBindingSettings(); methodDecoratorScopeWeaver = new MethodDecoratorScopeWeaver(aspectDefinition.Member, aspectWeavingSettings); weaver = new MethodDecoratorBindingWeaver(aspectDefinition.Member, bindingSettings, aspectWeavingSettings, this); }
internal AbstractPropertyBindingWeaver(PropertyInfo property, BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IMethodScopeWeaver getMethodScopeWeaver = null, IMethodScopeWeaver setMethodScopeWeaver = null) { this.property = property; this.bindingSettings = bindingSettings; this.getMethodScopeWeaver = getMethodScopeWeaver; this.setMethodScopeWeaver = setMethodScopeWeaver; this.aspectWeavingSettings = aspectWeavingSettings; }
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 AbstractAspectMethodWeaver(MethodInfo method, IAspectDefinitionCollection aspectDefinitions, IAspectWeavingSettings aspectWeavingSettings) { IAspectExpression aspectExpression = null; var aspectExpressionBuilder = new AspectExpressionTreeBuilder(aspectDefinitions); this.method = method; methodEndWeaver = new MethodEndWeaver(); aspectExpression = aspectExpressionBuilder.Build(); methodScopeWeaver = aspectExpression.Reduce(aspectWeavingSettings); }
public EventInterceptionBindingWeaver(EventInfo @event, BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IAspectWeaver addMethodScopeWeaver, IAspectWeaver removeMethodScopeWeaver, IAspectWeaver invokeMethodScopeWeaver) { this.@event = @event; this.bindingSettings = bindingSettings; this.addMethodScopeWeaver = addMethodScopeWeaver; this.aspectWeavingSettings = aspectWeavingSettings; this.removeMethodScopeWeaver = removeMethodScopeWeaver; this.invokeMethodScopeWeaver = invokeMethodScopeWeaver; ResolveParameterTypes(); }
protected virtual void OnFunctionWeavingDetected() { returnValueWeaver = new TopGetReturnValueWeaver(aspectWeavingSettings, argumentsWeavingSettings); }
internal BindingGetPropertyAspectDecoratorWeaver(PropertyInfo property, IAspectWeavingSettings aspectWeavingSettings) : base(property.GetGetMethod(), aspectWeavingSettings.WeavingSettings) { weaver = new GetPropertyDecoratorScopeWeaver(property, aspectWeavingSettings); }
internal TryCatchFinallyAspectWeaver(TryCatchFinallySettings tryCatchFinallySettings, IEnumerable<IMethodScopeWeaver> entryWeavers, IEnumerable<IMethodScopeWeaver> tryWeavers, IEnumerable<IMethodScopeWeaver> catchWeavers, IEnumerable<IMethodScopeWeaver> finallyWeavers, IMethodScopeWeaver returnValueWeaver = null) : base(entryWeavers, tryWeavers, finallyWeavers, returnValueWeaver) { this.catchWeavers = catchWeavers; this.tryCatchFinallySettings = tryCatchFinallySettings; }
internal PropertyDecorationBindingWeaver(PropertyInfo property, BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IMethodScopeWeaver methodScopeWeaver) : base(property, bindingSettings, aspectWeavingSettings, methodScopeWeaver) { }
public OnMethodBoundaryTryFinallyAspectWeaver(IEnumerable<IMethodScopeWeaver> entryWeavers, IEnumerable<IMethodScopeWeaver> tryWeavers, IEnumerable<IMethodScopeWeaver> finallyWeavers, IMethodScopeWeaver returnValueWeaver = null) : base(tryWeavers, finallyWeavers, returnValueWeaver) { this.entryWeavers = entryWeavers; }
internal MethodDecoratorBindingWeaver(MethodInfo method, BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IMethodScopeWeaver methodScopeWeaver) : base(method, bindingSettings, aspectWeavingSettings, methodScopeWeaver) { }
internal MethodDecoratorBindingWeaver(BindingSettings bindingSettings, IAspectWeavingSettings aspectWeavingSettings, IMethodScopeWeaver methodScopeWeaver) : base(bindingSettings, aspectWeavingSettings, methodScopeWeaver) { }
internal TryCatchFinallyAspectWeaver(TryCatchFinallySettings tryCatchFinallySettings, IMethodScopeWeaver entryWeaver, IEnumerable <IMethodScopeWeaver> tryWeavers, IMethodScopeWeaver catchWeaver, IEnumerable <IMethodScopeWeaver> finallyWeavers, IMethodScopeWeaver returnValueWeaver = null) : base(entryWeaver, tryWeavers, finallyWeavers, returnValueWeaver) { this.catchWeaver = catchWeaver; this.tryCatchFinallySettings = tryCatchFinallySettings; }