forked from PeterWaher/IoTGateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAnnotateEndpointEventArgs.cs
More file actions
48 lines (43 loc) · 1.24 KB
/
AnnotateEndpointEventArgs.cs
File metadata and controls
48 lines (43 loc) · 1.24 KB
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;
using System.Collections.Generic;
using System.Text;
namespace Waher.Security.LoginMonitor
{
/// <summary>
/// Event arguments for endpoint annotation events.
/// </summary>
public class AnnotateEndpointEventArgs : EventArgs
{
private readonly List<KeyValuePair<string, object>> tags = new List<KeyValuePair<string, object>>();
private readonly string remoteEndpoint;
/// <summary>
/// Event arguments for endpoint annotation events.
/// </summary>
/// <param name="RemoteEndpoint">Remote endpoint.</param>
public AnnotateEndpointEventArgs(string RemoteEndpoint)
{
this.remoteEndpoint = RemoteEndpoint;
}
/// <summary>
/// Remote endpoint.
/// </summary>
public string RemoteEndpoint => this.remoteEndpoint;
/// <summary>
/// Gets annotations, in the form of an array of tags.
/// </summary>
/// <returns>Array of tags.</returns>
public KeyValuePair<string,object>[] GetTags()
{
return this.tags.ToArray();
}
/// <summary>
/// Adds a tag to the list of tags.
/// </summary>
/// <param name="Key">Tag key name.</param>
/// <param name="Value">Tag value.</param>
public void AddTag(string Key, object Value)
{
this.tags.Add(new KeyValuePair<string, object>(Key, Value));
}
}
}