class RouteEndpointBuilder
cangjie
public class RouteEndpointBuilder <: EndpointBuilder功能:提供路由端点实例的构建器。
父类型:
成员概览
| 成员 | 功能 |
|---|---|
| init(RoutePattern, RequestDelegate, IServiceProvider) | 创建一个路由端点构建器。 |
| prop routePattern | 返回当前端点的路由模式。 |
| prop metadata | 返回当前端点的元数据集合。 |
| prop delegate | 返回当前端点的请求处理委托。 |
| prop services | 返回当前端点的服务提供器。 |
| prop displayName | 获取或设置端点显示名称。 |
| func build() | 构建最终的端点实例。 |
init(RoutePattern, RequestDelegate, IServiceProvider)
cangjie
public init(routePattern: RoutePattern, delegate: RequestDelegate, services: IServiceProvider)功能:创建一个路由端点构建器。
参数:
- routePattern: RoutePattern - 路由模式。
- delegate:
RequestDelegate- 请求处理委托。 - services: IServiceProvider - 应用程序服务提供器。
prop routePattern
cangjie
public prop routePattern: RoutePattern功能:返回当前端点的路由模式。
类型:RoutePattern
prop metadata
cangjie
public prop metadata: List<Any>功能:返回当前端点的元数据集合。
类型:List<Any>
prop delegate
cangjie
public prop delegate: RequestDelegate功能:返回当前端点的请求处理委托。
类型:RequestDelegate
prop services
cangjie
public prop services: IServiceProvider功能:返回当前端点的服务提供器。
prop displayName
cangjie
public mut prop displayName: ?String功能:获取或设置端点显示名称。
类型:?String
func build()
cangjie
public func build(): Endpoint功能:构建最终的端点实例。
返回值:
- Endpoint - 构建完成的端点。