Пример #1
0
 public RequestHandler4 <T, R, U, I> Body <I>(MediaTypeMapper mediaTypeMapper)
 {
     MediaTypeMapper = mediaTypeMapper;
     return(new RequestHandler4 <T, R, U, I>(
                Method,
                Path,
                ResolverParam1,
                ResolverParam2,
                ResolverParam3,
                ParameterResolver.Body <I>(mediaTypeMapper),
                ErrorHandler,
                mediaTypeMapper));
 }
Пример #2
0
 internal RequestHandler2(
     Method method,
     string path,
     ParameterResolver <T> resolverParam1,
     ParameterResolver <R> resolverParam2,
     IErrorHandler errorHandler,
     MediaTypeMapper mediaTypeMapper)
     : base(method, path, new List <IParameterResolver> {
     resolverParam1, resolverParam2
 }, errorHandler, mediaTypeMapper)
 {
     ResolverParam1 = resolverParam1;
     ResolverParam2 = resolverParam2;
 }
Пример #3
0
 internal RequestHandler5(
     Method method,
     string path,
     ParameterResolver <T> resolverParam1,
     ParameterResolver <R> resolverParam2,
     ParameterResolver <U> resolverParam3,
     ParameterResolver <I> resolverParam4,
     ParameterResolver <J> resolverParam5,
     IErrorHandler errorHandler,
     MediaTypeMapper mediaTypeMapper)
     : base(method, path, new List <IParameterResolver> {
     resolverParam1, resolverParam2, resolverParam3, resolverParam4, resolverParam5
 }, errorHandler, mediaTypeMapper)
 {
     ResolverParam1 = resolverParam1;
     ResolverParam2 = resolverParam2;
     ResolverParam3 = resolverParam3;
     ResolverParam4 = resolverParam4;
     ResolverParam5 = resolverParam5;
 }
Пример #4
0
 public RequestHandler2 <T, R> Param <R>()
 => new RequestHandler2 <T, R>(Method, Path, Resolver, ParameterResolver.Path <R>(1), ErrorHandler, MediaTypeMapper);
Пример #5
0
 public RequestHandler2 <T, Header> Header(string name)
 => new RequestHandler2 <T, Header>(Method, Path, Resolver, ParameterResolver.Header(name), ErrorHandler, MediaTypeMapper);
Пример #6
0
 public RequestHandler1 <T> Query <T>(string name, T defaultValue)
 => new RequestHandler1 <T>(Method, Path, ParameterResolver.Query(name, defaultValue), ErrorHandler, MediaTypeMapper);
Пример #7
0
 public RequestHandler1 <T> Body <T>(MediaTypeMapper mediaTypeMapper)
 {
     MediaTypeMapper = mediaTypeMapper;
     return(new RequestHandler1 <T>(Method, Path, ParameterResolver.Body <T>(mediaTypeMapper), ErrorHandler, mediaTypeMapper));
 }
Пример #8
0
 public RequestHandler1 <T> Body <T>(IMapper mapper)
 => new RequestHandler1 <T>(Method, Path, ParameterResolver.Body <T>(mapper), ErrorHandler, MediaTypeMapper);
Пример #9
0
 public RequestHandler1 <T> Param <T>()
 => new RequestHandler1 <T>(Method, Path, ParameterResolver.Path <T>(0), ErrorHandler, MediaTypeMapper);
Пример #10
0
 public RequestHandler3 <T, R, U> Body <U>()
 => new RequestHandler3 <T, R, U>(Method, Path, ResolverParam1, ResolverParam2, ParameterResolver.Body <U>(MediaTypeMapper), ErrorHandler, MediaTypeMapper);
Пример #11
0
 public RequestHandler3 <T, R, U> Query <U>(string name, Type queryClass)
 => new RequestHandler3 <T, R, U>(Method, Path, ResolverParam1, ResolverParam2, ParameterResolver.Query <U>(name), ErrorHandler, MediaTypeMapper);