-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathNodeCommand.cs
More file actions
83 lines (73 loc) · 2.62 KB
/
NodeCommand.cs
File metadata and controls
83 lines (73 loc) · 2.62 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
using Waher.Things;
namespace Waher.Networking.XMPP.Concentrator
{
/// <summary>
/// Information about a command on a node.
/// </summary>
public class NodeCommand
{
private readonly string command;
private readonly string name;
private readonly CommandType type;
private readonly string successString;
private readonly string failureString;
private readonly string confirmationString;
private readonly string sortCategory;
private readonly string sortKey;
/// <summary>
/// Information about a command on a node.
/// </summary>
/// <param name="Command">Command ID</param>
/// <param name="Name">Localized name of command.</param>
/// <param name="Type">Type of command.</param>
/// <param name="SuccessString">Optional localized string to display to the user, if command executes successfully.</param>
/// <param name="FailureString">Optional localized string to display to the user, if command fails.</param>
/// <param name="ConfirmationString">Optional localized string to display to the user before executing the command.</param>
/// <param name="SortCategory">Sort category.</param>
/// <param name="SortKey">Sort key (within category).</param>
public NodeCommand(string Command, string Name, CommandType Type, string SuccessString, string FailureString, string ConfirmationString,
string SortCategory, string SortKey)
{
this.command = Command;
this.name = Name;
this.type = Type;
this.successString = SuccessString;
this.failureString = FailureString;
this.confirmationString = ConfirmationString;
this.sortCategory = SortCategory;
this.sortKey = SortKey;
}
/// <summary>
/// Command ID
/// </summary>
public string Command => this.command;
/// <summary>
/// Localized name of command.
/// </summary>
public string Name => this.name;
/// <summary>
/// Type of command.
/// </summary>
public CommandType Type => this.type;
/// <summary>
/// Optional localized string to display to the user, if command executes successfully.
/// </summary>
public string SuccessString => this.successString;
/// <summary>
/// Optional localized string to display to the user, if command fails.
/// </summary>
public string FailureString => this.failureString;
/// <summary>
/// Optional localized string to display to the user before executing the command.
/// </summary>
public string ConfirmationString => this.confirmationString;
/// <summary>
/// Sort category.
/// </summary>
public string SortCategory => this.sortCategory;
/// <summary>
/// Sort key (within category).
/// </summary>
public string SortKey => this.sortKey;
}
}