CQRSalad.EventSourcing.ReflectionExtensions.FindMethodBySinglePameter C# (CSharp) Method

FindMethodBySinglePameter() static private method

static private FindMethodBySinglePameter ( this methodOwner, Type parameterType ) : MethodInfo
methodOwner this
parameterType System.Type
return System.Reflection.MethodInfo
        internal static MethodInfo FindMethodBySinglePameter(this IReflect methodOwner, Type parameterType)
        {
            //we can take First element, because we filter methods with definition: "public void ACTION_NAME (MESSAGE_TYPE message)"
            MethodInfo action = methodOwner.GetMethods(BindingFlags.Instance | BindingFlags.Public | BindingFlags.DeclaredOnly)
                                           .FirstOrDefault(_method => MethodsFilter(_method, parameterType));
            return action;
        }