Class IEndpointRouteBuilderExtensions
[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
IEndpointRouteBuilderpattern
string路由地址
paramsBuilder
Func<HttpContext, object>new{}匿名类型
verb
Verb默认:GET
excludeFromDescription
bool是否从OpenApi文档中排除,默认:false不排除
Returns
Type Parameters
T
MapGroup(IEndpointRouteBuilder, string, Action<IEndpointRouteBuilder>)
扩展MapGroup
public static RouteGroupBuilder MapGroup(this IEndpointRouteBuilder endpoints, string prefix, Action<IEndpointRouteBuilder> action)
Parameters
endpoints
IEndpointRouteBuilderprefix
string分组
action
Action<IEndpointRouteBuilder>
Returns
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
IEndpointRouteBuilderpattern
string路由地址
excludeFromDescription
bool是否从OpenApi文档中排除,默认:false不排除
Returns
Type Parameters
T