2using System.Threading.Tasks;
23 public override string Name =>
"ParentGraph";
34 StringBuilder sb =
new StringBuilder();
36 sb.AppendLine(
"```dot");
37 sb.AppendLine(
"digraph G {");
38 sb.AppendLine(
"rankdir=LR");
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];");
47 await ResponseCallback(sb.ToString(),
string.Empty);
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." };
An administrative command with no parameters.
Returns a GraphViz graph of the current broker connected to its parent broker. Consolidating response...
ParentGraph()
Returns a GraphViz graph of the current broker connected to its parent broker. Consolidating response...
override string[] HelpParagraphs
Markdown description of syntax.
override string Name
Command name
override async Task Execute(ChatState State, string[] Arguments, string OrgMessage, ResponseCallbackHandler ResponseCallback)
Executes the command.
delegate Task< string > ResponseCallbackHandler(string Markdown, string MessageId)
Delegate for response callback handler methods.