一款简单易用的基础网络通讯组件库。

IServerStopedPlugin 接口

定义了一个接口,用于标识和处理服务器停止时的插件行为。

Definition

命名空间: TouchSocket.Sockets
程序集: TouchSocket (在 TouchSocket.dll 中) 版本:3.0.0+ccaf96084d09f972257496d1dd63b8ba3c1e44f0
C#
[DynamicMethodAttribute]
public interface IServerStopedPlugin : IPlugin, 
	IDisposableObject, IDisposable
Implements
IDisposable, IDisposableObject, IPlugin

属性

DisposedValue 标识该对象是否已被释放
(继承自 IDisposableObject。)

方法

DisposePerforms application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
(继承自 IDisposable。)
Loaded 在插件被成功添加在IPluginManager时执行。
(继承自 IPlugin。)
OnServerStoped 当服务器调用StopAsync或者Dispose
Unloaded 在插件被Remove(IPlugin)时执行。
(继承自 IPlugin。)

扩展方法

SafeDispose 安全性释放(不用判断对象是否为空)。不会抛出任何异常。

内部会判断DisposedValue的值,如果为,则不会再执行Dispose


(由 SystemExtension 定义。)
SafeDispose 安全性释放(不用判断对象是否为空)。不会抛出任何异常。
(由 SystemExtension 定义。)

参见