Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
GetSources.cs
2using Waher.Script;
6using Waher.Things;
7
9{
14 {
15
23 : base(Start, Length, Expression)
24 {
25 }
26
30 public override string FunctionName => nameof(GetSources);
31
39 {
40 if (Types.TryGetModuleParameter("Sources", out object Obj) && Obj is IDataSource[] Sources)
41 return new ObjectValue(Sources);
42 else
43 return ObjectValue.Null;
44 }
45 }
46}
GetSources(int Start, int Length, Expression Expression)
Gets available sources of things.
Definition: GetSources.cs:22
override string FunctionName
Name of the function
Definition: GetSources.cs:30
override IElement Evaluate(Variables Variables)
Evaluates the node, using the variables provided in the Variables collection. This method should be ...
Definition: GetSources.cs:38
Static class that dynamically manages types and interfaces available in the runtime environment.
Definition: Types.cs:14
static bool TryGetModuleParameter(string Name, out object Value)
Tries to get a module parameter value.
Definition: Types.cs:583
Class managing a script expression.
Definition: Expression.cs:39
Base class for funcions of zero variables.
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
static readonly ObjectValue Null
Null value.
Definition: ObjectValue.cs:86
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
Interface for datasources that are published through the concentrator interface.
Definition: IDataSource.cs:14