internal static ArgumentsWeavingSettings ToArgumentsWeavingSettings(this BindingSettings bindingSettings, Type aspectType = null) { var methodParameters = bindingSettings.ToMethodParameters(); return(new ArgumentsWeavingSettings { AspectType = aspectType, MemberType = bindingSettings.MemberType, MemberInfo = bindingSettings.MemberInfo, ReturnType = methodParameters.ReturnType, Parameters = methodParameters.Parameters, ArgumentType = bindingSettings.ArgumentType, HasReturnType = bindingSettings.HasReturnType, BindingsDependency = bindingSettings.BindingDependency }); }
internal static ArgumentsWeavingSettings ToArgumentsWeavingSettings(this BindingSettings bindingSettings, Type aspectType = null) { Type bindingsDependencyType = null; var methodParameters = bindingSettings.ToMethodParameters(); if (bindingSettings.BindingDependency.IsNotNull()) { bindingsDependencyType = bindingSettings.BindingDependency.FieldType; } return(new ArgumentsWeavingSettings { AspectType = aspectType, IsFunction = bindingSettings.IsFunction, ReturnType = methodParameters.ReturnType, Parameters = methodParameters.Parameters, ArgumentType = bindingSettings.ArgumentType, BindingsDependency = bindingSettings.BindingDependency }); }