public HandlerMethod(MethodInfo methodInfo, TypeMapper typeMapper)
{
if (methodInfo == null)
throw new ArgumentNullException(nameof(methodInfo));
if (typeMapper == null)
throw new ArgumentNullException(nameof(typeMapper));
MethodInfo = methodInfo;
TypeMapper = typeMapper;
this.parameters =
new Lazy<IList<HandlerParameter>>(
() => methodInfo.GetParameters().Select(x => new HandlerParameter(x, this)).ToList());
this.parameterTypes = new Lazy<IList<Type>>(() => Parameters.MapList(x => x.Type));
}