Class AshxRouteData
Namespace: Tool.Web.Routing
Assembly: Tool.Net.dll
封装有关路由的信息。
public class AshxRouteDataInheritance
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
代码由逆血提供支持
Constructors
AshxRouteData(RouteContext, JsonSerializerOptions, ILogger, bool)
使用指定路由和路由处理程序初始化 类的新实例。
public AshxRouteData(RouteContext routeContext, JsonSerializerOptions jsonOptions, ILogger Logger, bool IsAsync)Parameters
routeContext RouteContext
封装与所定义路由匹配的 HTTP 请求的相关信息。
jsonOptions JsonSerializerOptions
json配置对象
Logger ILogger
日志模块
IsAsync bool
Properties
Action
当前的方法名
public string Action { get; }Property Value
Area
当前的控制器的命名空间
public string Area { get; }Property Value
Controller
当前的控制器
public string Controller { get; }Property Value
DataTokens
获取在 ASP.NET 路由确定路由是否匹配请求时,传递到路由处理程序但未使用的自定义值的集合。
public RouteValueDictionary DataTokens { get; }Property Value
GetAshx
获取当前对象的 Ashx
public Ashx GetAshx { get; }Property Value
GetRouteData
获取有关所请求路由的信息。
public virtual RouteData GetRouteData { get; }Property Value
Handler
获取或设置处理所请求路由的对象。
public RequestDelegate Handler { get; set; }Property Value
HttpContext
获取有关 HTTP 请求的信息。
public virtual HttpContext HttpContext { get; }Property Value
IsAshx
获取当前对象的 Ashx 是否为空
public bool IsAshx { get; }Property Value
IsAsync
是否采用异步线程池,处理每次请求路由的过程
public virtual bool IsAsync { get; }Property Value
Key
每次请求生成的Id
public string Key { get; }Property Value
Logger
日志信息
public virtual ILogger Logger { get; }Property Value
Routers
获取或设置表示路由的对象。
public IList<IRouter> Routers { get; }Property Value
Service
获取有关所请求路由的信息。
public virtual IServiceProvider Service { get; }Property Value
Values
获取路由的 URL 参数值和默认值的集合。
public RouteValueDictionary Values { get; }Property Value
Methods
GetNewJsonOptions()
获取一个新的 JsonSerializerOptions 对象 原对象来源于 AddAshx 时注册值
public JsonSerializerOptions GetNewJsonOptions()Returns
新的 JsonSerializerOptions 对象
GetRequired(string)
使用指定标识符检索值。
public object GetRequired(string valueName)Parameters
valueName string
要检索的值的键。
Returns
其键与 valueName 匹配的 System.Web.Routing.RouteData.Values 属性中的元素。
Exceptions
valueName 的值不存在。
GetRequiredString(string)
使用指定标识符检索值。
public string GetRequiredString(string valueName)Parameters
valueName string
要检索的值的键。
Returns
其键与 valueName 匹配的 System.Web.Routing.RouteData.Values 属性中的元素。
Exceptions
valueName 的值不存在。