1using System.Threading.Tasks;
23 public override string Name =>
"MyIp";
37 if (!IoTGateway.Setup.DomainConfiguration.Instance.DynamicDns ||
38 string.IsNullOrEmpty(s = IoTGateway.Setup.DomainConfiguration.Instance.CheckIpScript))
40 s =
"Before(Post(\"https://" + DomainName +
"/ID/CountryCode.ws\",\"\",{\"Accept\":\"application/json\"}).RemoteEndPoint,\":\")";
46 await ResponseCallback(Result?.ToString() ??
"null",
string.Empty);
52 public override string[]
HelpParagraphs =>
new string[] {
"Returns the current public IP, as seen by external parties." };
Implements an HTTP server.
static Variables CreateVariables()
Creates a new collection of variables, that contains access to the global set of variables.
Class managing a script expression.
async Task< object > EvaluateAsync(Variables Variables)
Evaluates the expression, using the variables provided in the Variables collection....
An administrative command with no parameters.
Returns the current public IP, as seen by external parties.
override string Name
Command name
MyIp()
Returns the current public IP, as seen by external parties.
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
Executes the command.
override string[] HelpParagraphs
Markdown description of syntax.
Provisioning and registry service component.
static Task< string > GetOnboardingNeuronDomainName()
Gets the domain name of the Nnboarding Neuron.
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.