Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Cancel.cs
1using System;
2using System.Threading.Tasks;
5
7{
12 {
16 public Cancel()
17 {
18 }
19
23 public override string Name => "Cancel";
24
32 public override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
33 {
34 if (XmppServerModule.autoUpdateTP > DateTime.MinValue)
35 {
37 XmppServerModule.autoUpdateTP = DateTime.MinValue;
38
39 await RuntimeSettings.SetAsync(XmppServerModule.AutoInstallTimeParameterName, DateTime.MinValue);
40
41 await ResponseCallback("Auto-update procedure cancelled.", string.Empty);
42 }
43 else
44 await ResponseCallback("No auto-update procedure active.", string.Empty);
45 }
46
50 public override string[] HelpParagraphs => new string[] { "Cancels the current auto-update delay. Disabling auto-updates is done using the `auto 0` command." };
51 }
52}
Static class managing the runtime environment of the IoT Gateway.
Definition: Gateway.cs:126
static bool CancelScheduledEvent(DateTime When)
Cancels a scheduled event.
Definition: Gateway.cs:3474
Static class managing persistent settings.
static async Task< bool > SetAsync(string Key, string Value)
Sets a string-valued setting.
An administrative command with no parameters.
Cancels an auto-update procedure.
Definition: Cancel.cs:12
Cancel()
Cancels an auto-update procedure.
Definition: Cancel.cs:16
override string[] HelpParagraphs
Markdown description of syntax.
Definition: Cancel.cs:50
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
Executes the command.
Definition: Cancel.cs:32
override string Name
Command name
Definition: Cancel.cs:23
Service Module hosting the XMPP broker and its components.
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.