Skip to content

Class ApiRouteEndpointBuilderExtensions

Namespace: Microsoft.AspNetCore.Builder
Assembly: Tool.Net.dll

注册 Ashx 终结点路由的扩展模式

csharp
public static class ApiRouteEndpointBuilderExtensions

Inheritance

objectApiRouteEndpointBuilderExtensions

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), object.MemberwiseClone(), object.ReferenceEquals(object?, object?), object.ToString()

Extension Methods

ObjectExtension.Add<T>(object, object, object), ObjectExtension.CopyEntity(object, object, params string[]), ObjectExtension.EntityToJson(object), ObjectExtension.EntityToJson(object, bool), ObjectExtension.EntityToJson(object, bool, string), DictionaryExtension.GetDictionary(object), TypeExtension.GetFieldKey(object, string, out bool), TypeExtension.GetFieldKey<T>(object, string, out bool), TypeExtension.GetFieldKey(object, Type, string, out bool), ObjectExtension.GetIntPtr(object), ObjectExtension.GetIntPtrInt(object), TypeExtension.GetPropertieFind(object, string, bool), TypeExtension.GetProperties(object), TypeExtension.GetPropertyKey(object, string, out bool), TypeExtension.GetPropertyKey<T>(object, string, out bool), TypeExtension.GetPropertyKey(object, Type, string, out bool), TypeExtension.GetValue(object, PropertyDescriptor), TypeExtension.GetValue(object, string, bool), TypeExtension.GetValue(object, string), ObjectExtension.Read<T>(object, object, int, int), ObjectExtension.Read<T>(object, int, object, int, int), DictionaryExtension.SetDictionary(object, IDictionary<string, object>), TypeExtension.SetFieldKey(object, string, object), TypeExtension.SetFieldKey<T>(object, string, object), TypeExtension.SetFieldKey(object, Type, string, object), TypeExtension.SetPropertyKey(object, string, object), TypeExtension.SetPropertyKey<T>(object, string, object), TypeExtension.SetPropertyKey(object, Type, string, object), TypeExtension.SetValue(object, PropertyDescriptor, object), TypeExtension.SetValue(object, string, object, bool), TypeExtension.SetValue(object, string, object), ObjectExtension.ToBase64String(object), ObjectExtension.ToBytes(object), ObjectExtension.ToBytes(object, out Type), DictionaryExtension.ToDictionary(object), DictionaryExtension.ToDictionary<T>(object), DictionaryExtension.ToIDictionary(object), DictionaryExtension.ToIDictionary<T>(object), ObjectExtension.ToJson(object), ObjectExtension.ToJson(object, JsonSerializerOptions), ObjectExtension.ToJsonWeb(object), ObjectExtension.ToJsonWeb(object, Action<JsonSerializerOptions>), ObjectExtension.ToTryVar<T>(object, T), ObjectExtension.ToVar<T>(object), ObjectExtension.ToVar(object, Type, bool), ObjectExtension.ToVar(object, string), ObjectExtension.ToXml(object)

Remarks

代码由逆血提供支持

Methods

MapApiRoute(EndpointDataSource, string)

创建与AshxApi有关的路由

csharp
public static EndpointDataSource MapApiRoute(this EndpointDataSource endpointData, string template)

Parameters

endpointData EndpointDataSource

路由核心对象

template string

路由的规则

Returns

EndpointDataSource

路由核心对象

MapApiRoute(EndpointDataSource, string, string)

创建与AshxApi有关的路由

csharp
public static EndpointDataSource MapApiRoute(this EndpointDataSource endpointData, string areaName, string template)

Parameters

endpointData EndpointDataSource

路由核心对象

areaName string

区域名称,可为null

template string

路由的规则

Returns

EndpointDataSource

路由核心对象

MapApiRoute(EndpointDataSource, string, string, string)

创建与AshxApi有关的路由

csharp
public static EndpointDataSource MapApiRoute(this EndpointDataSource endpointData, string areaName, string controller, string template)

Parameters

endpointData EndpointDataSource

路由核心对象

areaName string

区域名称,可为null

controller string

控制器名称,可为null

template string

路由的规则

Returns

EndpointDataSource

路由核心对象

MapApiRoute(EndpointDataSource, string, string, string, string)

创建与AshxApi有关的路由

csharp
public static EndpointDataSource MapApiRoute(this EndpointDataSource endpointData, string areaName, string controller, string action, string template)

Parameters

endpointData EndpointDataSource

路由核心对象

areaName string

区域名称,可为null

controller string

控制器名称,可为null

action string

方法名称,可为null

template string

路由的规则

Returns

EndpointDataSource

路由核心对象

MapApiRoute(EndpointDataSource, string, string, object, object, object)

创建与AshxApi有关的路由

csharp
public static EndpointDataSource MapApiRoute(this EndpointDataSource endpointData, string areaName, string template, object defaults, object constraints, object dataTokens)

Parameters

endpointData EndpointDataSource

路由核心对象

areaName string

区域名称,可为null

template string

路由的规则

defaults object

包含路由参数默认值的对象。对象的属性表示,默认值的名称和值,可为null。

constraints object

包含路由约束的对象。对象的属性表示,约束的名称和值,可为null。

dataTokens object

包含路由的数据标记的对象。对象的属性表示,数据标记的名称和值,可为null。

Returns

EndpointDataSource

路由核心对象

基于Apache-2.0协议开源