2using System.Collections.Generic;
4using System.Threading.Tasks;
31 StringBuilder Markdown =
new StringBuilder();
33 if (!
Event.
Message.Contains(
"=======" + Environment.NewLine))
35 Markdown.AppendLine(
Event.
Type.ToString());
36 Markdown.AppendLine(
"===============");
37 Markdown.AppendLine();
42 Markdown.AppendLine();
43 Markdown.AppendLine(
"| Information ||");
44 Markdown.AppendLine(
"|:------|:-----|");
48 this.AppendLabel(
"Actor",
Event.
Actor, Markdown);
55 foreach (KeyValuePair<string, object> P
in Event.
Tags)
56 this.AppendLabel(P.Key, P.Value?.ToString(), Markdown);
62 private void AppendLabel(
string Label,
string Value, StringBuilder Markdown)
66 Markdown.Append(
"| ");
68 Markdown.Append(
" | ");
70 if (Value.Length > 2 && Value.StartsWith(
":") && Value.EndsWith(
":") &&
73 Markdown.Append(Value);
77 foreach (
string Row
in Value.Trim().Replace(
"\r\n",
"\n").Replace(
"\r",
"\n").Split(
'\n'))
82 Markdown.Append(
"<br/>");
88 Markdown.AppendLine(
" |");
Contains information about an emoji.
Static class that provide methods for managing emojis.
static bool TryGetEmoji(string ShortName, out EmojiInfo Emoji)
Tries to get information about an emoji, given its short name.
Contains a markdown document. This markdown document class supports original markdown,...
static string Encode(string s)
Encodes all special characters in a string so that it can be included in a markdown document without ...
Class representing an event.
string Message
Free-text event message.
EventType Type
Type of event.
string Object
Object related to the event.
string Actor
Actor responsible for the action causing the event.
string Module
Module where the event is reported.
DateTime Timestamp
Timestamp of event.
KeyValuePair< string, object >[] Tags
Variable set of tags providing event-specific information.
string EventId
Computer-readable Event ID identifying type of even.
string Facility
Facility can be either a facility in the network sense or in the system sense.
Base class for event sinks.
virtual string ObjectID
Object ID, used when logging events.
Event sink that forwards events as notification messages to administrators.
AlertNotifier(string ObjectID)
Event sink that forwards events as notification messages to administrators.
override Task Queue(Event Event)
Queues an event to be output.
Static class managing the runtime environment of the IoT Gateway.
static Task SendNotification(Graph Graph)
Sends a graph as a notification message to configured notification recipients.