private static BindingSettings ToEventBindingSettings(this IEventAspectDefinition aspectDefinition) { var aspectArgumentType = aspectDefinition.GetArgumentType(); var aspectArgumentImplType = aspectDefinition.ToAspectArgumentImpl(); var genericArguments = aspectArgumentImplType.GetGenericArguments(); if (aspectArgumentType.IsFunctionAspectArgs()) { return(new BindingSettings { HasReturnType = true, MemberType = MemberTypes.Event, MemberInfo = aspectDefinition.Member, ArgumentType = aspectArgumentImplType, BindingType = aspectArgumentType.MakeEventGenericFunctionBinding(genericArguments) }); } return(new BindingSettings { MemberType = MemberTypes.Event, MemberInfo = aspectDefinition.Member, ArgumentType = aspectArgumentImplType, BindingType = aspectArgumentType.MakeEventGenericActionBinding(genericArguments) }); }
internal static Type ToAspectArgumentImpl(this IEventAspectDefinition aspectDefinition) { return(aspectDefinition.ToAspectArgumentImpl(aspectDefinition.Member.GetAddMethod())); }