-
Notifications
You must be signed in to change notification settings - Fork 252
/
AbnormalCloseEvent.cs
48 lines (42 loc) · 1.2 KB
/
AbnormalCloseEvent.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System;
namespace Skyline.DataMiner.Net
{
/// <summary>
/// Delegate used for the <see cref="IConnection.OnAbnormalClose"/> event of the <see cref="IConnection"/> interface.
/// </summary>
public delegate void AbnormalCloseEventHandler(Object sender, AbnormalCloseEventArgs e);
/// <summary>
/// Event arguments for use with <see cref="AbnormalCloseEventHandler"/>.
/// </summary>
/// <remarks>
/// <seealso cref="IConnection.OnAbnormalClose"/>
/// </remarks>
[Serializable]
public class AbnormalCloseEventArgs : EventArgs
{
/// <summary>
/// Initializes a new instance of the <see cref="AbnormalCloseEventArgs"/> class.
/// </summary>
public AbnormalCloseEventArgs() { }
/// <summary>
/// Initializes a new instance of the <see cref="AbnormalCloseEventArgs"/> class.
/// </summary>
/// <param name="reason">Reason why the connection was destroyed.</param>
public AbnormalCloseEventArgs(String reason)
{
_reason = reason;
}
/// <summary>
/// Gets the reason why the connection was destroyed.
/// </summary>
/// <value>The reason why the connection was destroyed.</value>
public string Reason
{
get
{
return _reason;
}
}
private string _reason;
}
}