-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add an argument for disconnect event which carrier reason
- Loading branch information
1 parent
0e2d1ad
commit c70e673
Showing
2 changed files
with
30 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
Source/Meadow.Contracts/Hardware/Networking/NetworkDisconnectionEventArgs.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System; | ||
|
||
namespace Meadow.Hardware; | ||
|
||
/// <summary> | ||
/// Data relating to a WiFi disconnect event. | ||
/// </summary> | ||
public class NetworkDisconnectionEventArgs : EventArgs | ||
{ | ||
/// <summary> | ||
/// Date and time the event was generated. | ||
/// </summary> | ||
public DateTime When { get; private set; } | ||
|
||
/// <summary> | ||
/// Disconnect reason | ||
/// </summary> | ||
public string Reason { get; } | ||
|
||
/// <summary> | ||
/// Construct a NetworkDisconnectionEventArgs object. | ||
/// </summary> | ||
public NetworkDisconnectionEventArgs(string reson) | ||
{ | ||
When = DateTime.UtcNow; | ||
Reason = reson; | ||
} | ||
} |