Table of Contents

Class IEndpointRouteBuilderExtensions

Namespace
Biwen.QuickApi
Assembly
Biwen.QuickApi.dll
[SuppressType]
public static class IEndpointRouteBuilderExtensions
Inheritance
IEndpointRouteBuilderExtensions
Inherited Members

Methods

MapComponent<T>(IEndpointRouteBuilder, string, Func<HttpContext, object>?, Verb, bool)

扩展MapComponent,请注意只负责渲染,Component无法执行内部事件

public static RouteHandlerBuilder MapComponent<T>(this IEndpointRouteBuilder app, string pattern, Func<HttpContext, object>? paramsBuilder = null, Verb verb = Verb.GET, bool excludeFromDescription = true) where T : class, IComponent

Parameters

app IEndpointRouteBuilder
pattern string

路由地址

paramsBuilder Func<HttpContext, object>

new{}匿名类型

verb Verb

默认:GET

excludeFromDescription bool

是否从OpenApi文档中排除,默认:false不排除

Returns

RouteHandlerBuilder

Type Parameters

T

MapGroup(IEndpointRouteBuilder, string, Action<IEndpointRouteBuilder>)

扩展MapGroup

public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints, string prefix, Action<IEndpointRouteBuilder> action)

Parameters

endpoints IEndpointRouteBuilder
prefix string

分组

action Action<IEndpointRouteBuilder>

Returns

RouteGroupBuilder

MapMethods<T>(IEndpointRouteBuilder, string, bool)

扩展MapMethods

public static RouteHandlerBuilder MapMethods<T>(this IEndpointRouteBuilder app, string pattern, bool excludeFromDescription = false) where T : class, IQuickEndpoint

Parameters

app IEndpointRouteBuilder
pattern string

路由地址

excludeFromDescription bool

是否从OpenApi文档中排除,默认:false不排除

Returns

RouteHandlerBuilder

Type Parameters

T