示例#1
0
 public RouteProvider(NtradaOptions options, IRequestHandlerManager requestHandlerManager,
                      IRouteConfigurator routeConfigurator, IRequestExecutionValidator requestExecutionValidator,
                      IUpstreamBuilder upstreamBuilder, WebApiEndpointDefinitions definitions, ILogger <RouteProvider> logger)
 {
     _routeConfigurator         = routeConfigurator;
     _requestExecutionValidator = requestExecutionValidator;
     _upstreamBuilder           = upstreamBuilder;
     _definitions           = definitions;
     _options               = options;
     _requestHandlerManager = requestHandlerManager;
     _logger  = logger;
     _methods = new Dictionary <string, Action <IEndpointRouteBuilder, string, RouteConfig> >
     {
         ["get"] = (builder, path, routeConfig) =>
                   builder.MapGet(path, ctx => Handle(ctx, routeConfig)),
         ["post"] = (builder, path, routeConfig) =>
                    builder.MapPost(path, ctx => Handle(ctx, routeConfig)),
         ["put"] = (builder, path, routeConfig) =>
                   builder.MapPut(path, ctx => Handle(ctx, routeConfig)),
         ["delete"] = (builder, path, routeConfig) =>
                      builder.MapDelete(path, ctx => Handle(ctx, routeConfig)),
     };
 }
示例#2
0
 public WebApiDocumentFilter(WebApiEndpointDefinitions definitions)
 => _definitions = definitions;
示例#3
0
 public EndpointsBuilder(IEndpointRouteBuilder routeBuilder, WebApiEndpointDefinitions definitions)
 {
     _routeBuilder = routeBuilder;
     _definitions  = definitions;
 }
示例#4
0
 public WebApiDocumentFilter(WebApiEndpointDefinitions definitions, IJsonSerializer jsonSerializer)
 {
     _definitions    = definitions;
     _jsonSerializer = jsonSerializer;
 }