Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
ParentGraph.cs
1using System.Text;
2using System.Threading.Tasks;
3
5{
11 {
16 public ParentGraph()
17 {
18 }
19
23 public override string Name => "ParentGraph";
24
32 public override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
33 {
34 StringBuilder sb = new StringBuilder();
35
36 sb.AppendLine("```dot");
37 sb.AppendLine("digraph G {");
38 sb.AppendLine("rankdir=LR");
39 sb.Append('"');
40 sb.Append(IoTGateway.Setup.XmppConfiguration.Instance.Host);
41 sb.Append("\" -> \"");
42 sb.Append(string.IsNullOrEmpty(IoTGateway.Gateway.Domain) ? IoTGateway.Gateway.XmppClient.BareJID : IoTGateway.Gateway.Domain.Value);
43 sb.AppendLine("\" [dir=back];");
44 sb.AppendLine("}");
45 sb.AppendLine("```");
46
47 await ResponseCallback(sb.ToString(), string.Empty);
48 }
49
53 public override string[] HelpParagraphs => new string[] { "Returns a GraphViz graph of the current broker connected to its parent broker. Consolidating responses from multiple brokers generates a topology graph of all brokers." };
54 }
55}
An administrative command with no parameters.
Returns a GraphViz graph of the current broker connected to its parent broker. Consolidating response...
Definition: ParentGraph.cs:11
ParentGraph()
Returns a GraphViz graph of the current broker connected to its parent broker. Consolidating response...
Definition: ParentGraph.cs:16
override string[] HelpParagraphs
Markdown description of syntax.
Definition: ParentGraph.cs:53
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
Executes the command.
Definition: ParentGraph.cs:32
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.