Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PipeEventSinkNode.cs
2using System.Threading.Tasks;
3using System.Xml;
6using Waher.Things;
9
11{
16 {
21 : base()
22 {
23 }
24
33 string SinkId, string PipeName)
34 : base(Source, Parent, SinkId)
35 {
36 this.PipeName = PipeName;
37 }
38
42 [Page(7, "Configuration")]
43 [Header(175, "Pipe Name:")]
44 [ToolTip(176, "Name of pipe to which events will be sent.")]
45 [Required]
46 public string PipeName { get; set; }
47
52 public override Task<string> GetTypeNameAsync(Language Language)
53 {
54 return Language.GetStringAsync(typeof(GatewayConfigSource), 177, "Pipe Event Sink");
55 }
56
63 public override async Task<IEnumerable<Parameter>> GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
64 {
65 LinkedList<Parameter> Parameters = (LinkedList<Parameter>)await base.GetDisplayableParametersAsync(Language, Caller);
67
68 Parameters.AddLast(new StringParameter("PipeName", await Namespace.GetStringAsync(178, "Pipe Name"), this.PipeName));
69
70 return Parameters;
71 }
72
77 public override void Export(XmlWriter Output)
78 {
79 Output.WriteStartElement("PipeEventSink");
80 Output.WriteAttributeString("id", this.SinkId);
81 Output.WriteAttributeString("pipeName", this.PipeName);
82 Output.WriteEndElement();
83 }
84 }
85}
Contains information about a language.
Definition: Language.cs:17
Task< string > GetStringAsync(Type Type, int Id, string Default)
Gets the string value of a string ID. If no such string exists, a string is created with the default ...
Definition: Language.cs:209
async Task< Namespace > GetNamespaceAsync(string Name)
Gets the namespace object, given its name, if available.
Definition: Language.cs:99
Contains information about a namespace in a language.
Definition: Namespace.cs:17
Task< LanguageString > GetStringAsync(int Id)
Gets the string object, given its ID, if available.
Definition: Namespace.cs:65
Abstract base class for gateway configuration nodes.
virtual INode Parent
Parent Node, or null if a root node.
GatewayConfigSource Source
Source hosting the node.
Abstract base class for event sink nodes.
override void Export(XmlWriter Output)
Exports the event sink definition to XML.
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
override async Task< IEnumerable< Parameter > > GetDisplayableParametersAsync(Language Language, RequestOrigin Caller)
Gets displayable parameters.
PipeEventSinkNode(GatewayConfigSource Source, ConfigurationNode Parent, string SinkId, string PipeName)
Representation of a PipeEventSink
Tokens available in request.
Definition: RequestOrigin.cs:9