Skip to content

Class Ashx

Namespace: Tool.Web.Api
Assembly: Tool.Net.dll

针对于一般处理程序,备注一般处理程序必须继承于( 类才会生效) 所有状态(用于更好的使用API)

csharp
[Serializable]
[AttributeUsage(AttributeTargets.Method, Inherited = false)]
public class Ashx : Attribute

Inheritance

objectAttributeAshx

Inherited Members

Attribute.Equals(object?), Attribute.GetCustomAttribute(Assembly, Type), Attribute.GetCustomAttribute(Assembly, Type, bool), Attribute.GetCustomAttribute(MemberInfo, Type), Attribute.GetCustomAttribute(MemberInfo, Type, bool), Attribute.GetCustomAttribute(Module, Type), Attribute.GetCustomAttribute(Module, Type, bool), Attribute.GetCustomAttribute(ParameterInfo, Type), Attribute.GetCustomAttribute(ParameterInfo, Type, bool), Attribute.GetCustomAttributes(Assembly), Attribute.GetCustomAttributes(Assembly, bool), Attribute.GetCustomAttributes(Assembly, Type), Attribute.GetCustomAttributes(Assembly, Type, bool), Attribute.GetCustomAttributes(MemberInfo), Attribute.GetCustomAttributes(MemberInfo, bool), Attribute.GetCustomAttributes(MemberInfo, Type), Attribute.GetCustomAttributes(MemberInfo, Type, bool), Attribute.GetCustomAttributes(Module), Attribute.GetCustomAttributes(Module, bool), Attribute.GetCustomAttributes(Module, Type), Attribute.GetCustomAttributes(Module, Type, bool), Attribute.GetCustomAttributes(ParameterInfo), Attribute.GetCustomAttributes(ParameterInfo, bool), Attribute.GetCustomAttributes(ParameterInfo, Type), Attribute.GetCustomAttributes(ParameterInfo, Type, bool), Attribute.GetHashCode(), Attribute.IsDefaultAttribute(), Attribute.IsDefined(Assembly, Type), Attribute.IsDefined(Assembly, Type, bool), Attribute.IsDefined(MemberInfo, Type), Attribute.IsDefined(MemberInfo, Type, bool), Attribute.IsDefined(Module, Type), Attribute.IsDefined(Module, Type, bool), Attribute.IsDefined(ParameterInfo, Type), Attribute.IsDefined(ParameterInfo, Type, bool), Attribute.Match(object?), Attribute.TypeId, 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

Ashx()

用于实现构造(带默认参数)

csharp
public Ashx()

Properties

CrossDomain

表示当前请求是否支持跨域请求,设置您的跨域对象

csharp
public CrossDomain CrossDomain { get; }

Property Value

CrossDomain

ID

表示为该方法指定了一个名称,用于对外的访问安全。(注明:第一次设置的时候生效,后期修改无效。)

csharp
public string ID { get; set; }

Property Value

string

IsMethods

表示当前方法是否包含在被调起方法内。(注明:第一次设置的时候生效,后期修改无效。)

csharp
public bool IsMethods { get; set; }

Property Value

bool

IsMinApi

标注当前请求是否是请求的最小API

csharp
public bool IsMinApi { get; }

Property Value

bool

IsOnAshxEvent

获取当前调用方法是不是事件方法,声明事件方法必须使用 类作为返回值。

csharp
public bool IsOnAshxEvent { get; }

Property Value

bool

IsTask

标注当前请求是否是异步方法(注明:该参数只支持 / 的新路由方式支持)

csharp
public bool IsTask { get; }

Property Value

bool

Methods

表示该方法的名称

csharp
public string Methods { get; }

Property Value

string

Parameters

表示该方法所包含的访问参数

csharp
public ApiParameter[] Parameters { get; }

Property Value

ApiParameter[]

State

请求的一个状态

csharp
public AshxState State { get; set; }

Property Value

AshxState

Methods

GetAttribute<T>()

根据指定的自定义类获取当前接口对象上的(自定义类)

csharp
public T GetAttribute<T>() where T : Attribute

Returns

T

返回(自定义类)

Type Parameters

T

指定的(自定义类)

GetAttributes()

获取当前接口对象上的所有(自定义类)

csharp
public Attribute[] GetAttributes()

Returns

Attribute[]

返回所有的(自定义类)

TryGetValue<T>(out T)

获取自定义类,根据获取 (缓存效率更高。)

csharp
public bool TryGetValue<T>(out T value) where T : Attribute

Parameters

value T

返回的类

Returns

bool

返回(自定义类)

Type Parameters

T

指定的(自定义类)

TryGetValue(Type, out Attribute)

获取自定义类,根据获取 (缓存效率更高。)

csharp
public bool TryGetValue(Type key, out Attribute value)

Parameters

key Type

自定义类的

value Attribute

返回的类

Returns

bool

返回(自定义类)

基于Apache-2.0协议开源