Skip to content

Class OnAshxEvent

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

针对于继承 的类,用于事件方法接口,需要另一个模块驱动的消息接口,可以使用

csharp
public sealed class OnAshxEvent : IDisposable

Inheritance

objectOnAshxEvent

Implements

IDisposable

Inherited Members

object.Equals(object?), object.Equals(object?, object?), object.GetHashCode(), object.GetType(), 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

OnAshxEvent(Action<OnAshxEvent>)

完成该有的配置

csharp
public OnAshxEvent(Action<OnAshxEvent> Event)

Parameters

Event Action<OnAshxEvent>

当前长连接要执行的消息方法

OnAshxEvent(Action<OnAshxEvent>, string)

完成该有的配置

csharp
public OnAshxEvent(Action<OnAshxEvent> Event, string GuId)

Parameters

Event Action<OnAshxEvent>

当前长连接要执行的消息方法

GuId string

配置的访问事件ID

Properties

ContentType

获取或设置输出流的 HTTP MIME 类型。

csharp
public string ContentType { get; set; }

Property Value

string

Remarks

输出流的 HTTP MIME 类型。 默认值为“text/html”。

Data

用户数据

csharp
public object Data { get; set; }

Property Value

object

DelayTime

表示当前长连接可以维持的毫秒数 (默认60秒)

csharp
public int DelayTime { get; set; }

Property Value

int

GuId

类似于ID,必须是唯一的,用于被调用

csharp
public string GuId { get; set; }

Property Value

string

IsFlush

是否先向客户端输出空包,将不会阻塞线程

csharp
public bool IsFlush { get; set; }

Property Value

bool

OnAshx

用于表示当前事件的执行情况

csharp
public OnAshxEventState OnAshx { get; }

Property Value

OnAshxEventState

Methods

Dispose()

释放由 类的当前实例使用的所有资源。

csharp
public void Dispose()

IsStartEvent(string)

触发已有的事件

csharp
public static bool IsStartEvent(string GuId)

Parameters

GuId string

事件ID

Returns

bool

返回是否存在

IsStartEvent(string, object)

触发已有的事件

csharp
public static bool IsStartEvent(string GuId, object Data)

Parameters

GuId string

事件ID

Data object

传入的数据

Returns

bool

返回是否存在

基于Apache-2.0协议开源