Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
Ports.cs
1using System.Threading.Tasks;
3using Waher.Things;
4
6{
10 public class Ports : ConfigurationNode
11 {
12 internal const string Id = "Ports";
13
19 : base(Source, null)
20 {
21 }
22
26 public override string NodeId => Id;
27
32 public override Task<string> GetTypeNameAsync(Language Language) => Language.GetStringAsync(typeof(GatewayConfigSource), 40, "Ports");
33
39 public override Task<bool> AcceptsChildAsync(INode Child)
40 {
41 return Task.FromResult(Child is Port);
42 }
43
49 public override Task<bool> CanDestroyAsync(RequestOrigin Caller)
50 {
51 return Task.FromResult(false);
52 }
53 }
54}
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
Abstract base class for gateway configuration nodes.
GatewayConfigSource Source
Source hosting the node.
Root node of port numbers to use.
Definition: Ports.cs:11
override Task< bool > CanDestroyAsync(RequestOrigin Caller)
If the node can be destroyed to by the caller.
Definition: Ports.cs:49
Ports(GatewayConfigSource Source)
Root node of port numbers to use.
Definition: Ports.cs:18
override Task< bool > AcceptsChildAsync(INode Child)
If the node accepts a presumptive child, i.e. can receive as a child (if that child accepts the node ...
Definition: Ports.cs:39
override Task< string > GetTypeNameAsync(Language Language)
Gets the type name of the node.
Tokens available in request.
Definition: RequestOrigin.cs:9
Interface for nodes that are published through the concentrator interface.
Definition: INode.cs:49