Commit fd6a7bce by liulongfei

添加状态改变事件参数

parent 1c626070
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace VIZ.Framework.Connection
{
/// <summary>
/// 连接状态改变事件参数
/// </summary>
public class ConnectionStateChangedEventArgs : EventArgs
{
/// <summary>
/// 连接状态改变事件参数
/// </summary>
/// <param name="source">源</param>
/// <param name="isConnected">是否连接</param>
public ConnectionStateChangedEventArgs(object source, bool isConnected)
{
this.Source = source;
this.IsConnected = isConnected;
}
/// <summary>
/// 触发源
/// </summary>
public object Source { get; private set; }
/// <summary>
/// 是否保持连接
/// </summary>
public bool IsConnected { get; private set; }
/// <summary>
/// 异常信息
/// </summary>
public Exception Exception { get; set; }
}
}
......@@ -75,6 +75,7 @@
<Compile Include="Core\ConnPackageInfo.cs" />
<Compile Include="Core\ConnPackageProviderAttribute.cs" />
<Compile Include="Core\ConnSendMessage.cs" />
<Compile Include="Event\ConnectionStateChangedEventArgs.cs" />
<Compile Include="Listener\TCP\TcpConnectionListener.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Protocol\SerialPort\SerialPortEndpointManagerExpand.cs" />
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment