public override IAspectWeaver Reduce(IAspectWeavingSettings aspectWeavingSettings) { var topAspectInScopeArgType = topAspectInScopeDefinition.ToAspectArgumentImpl(); var bindingWeaver = new IsolatedMethodInterceptionBindingWeaver(aspectExpression, aspectDefinition, aspectWeavingSettings); return(new BindingMethodInterceptionAspectWeaver(topAspectInScopeArgType, aspectDefinition, aspectWeavingSettings, bindingWeaver.WeavedType)); }
private static BindingSettings ToMethodBindingSettings(this IMethodAspectDefinition aspectDefinition) { var aspectArgumentType = aspectDefinition.GetArgumentType(); var aspectArgumentImplType = aspectDefinition.ToAspectArgumentImpl(); var genericArguments = aspectArgumentImplType.GetGenericArguments(); if (aspectArgumentType.IsFunctionAspectArgs()) { return(new BindingSettings { HasReturnType = true, MemberType = MemberTypes.Method, MemberInfo = aspectDefinition.Member, ArgumentType = aspectArgumentImplType, BindingType = aspectArgumentType.MakeGenericFunctionBinding(genericArguments) }); } return(new BindingSettings { MemberType = MemberTypes.Method, MemberInfo = aspectDefinition.Member, ArgumentType = aspectArgumentImplType, BindingType = aspectArgumentType.MakeGenericActionBinding(genericArguments) }); }
public IAspectWeaver Reduce(IAspectWeavingSettings aspectWeavingSettings) { var topAspectInScopeArgType = topAspectInScopeDefinition.ToAspectArgumentImpl(); return(new MethodInvokerAspectWeaver(topAspectInScopeArgType, aspectDefinition, aspectWeavingSettings, argumentsWeavingSettings)); }
internal static Type ToAspectArgumentImpl(this IMethodAspectDefinition aspectDefinition) { return(aspectDefinition.ToAspectArgumentImpl(aspectDefinition.Member)); }