示例#1
0
 private ParamInfo[] GetRequestParams(MethodInfo action, string route, HttpMethod method)
 {
     return(action.GetParameters()
            .Select(p => new ParamInfo
     {
         Kind = _options.GetParameterKindStrategy(p, route, method),
         Name = p.Name,
         Type = p.ParameterType
     }).ToArray());
 }
示例#2
0
 private ParamInfo[] GetRequestParams(MethodInfo action, string route, HttpMethod method)
 {
     return action.GetParameters()
         .Select(p =>
         {
             var kind = _options.GetParameterKindStrategy(p, route, method);
             return new ParamInfo(kind, p.Name ?? string.Empty, p.ParameterType,
                 kind == ParameterKind.Route
                     ? GetDestructuredProperties(p, route)
                     : Array.Empty<DestructuredPropertyInfo>());
         }).ToArray();
 }