Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
AuthorizeSource.cs
1using System;
2using System.Threading.Tasks;
3
5{
10 {
15 : base()
16 {
17 }
18
22 public override string LocalName => nameof(AuthorizeSource);
23
28 public override IStateMachineNode Create()
29 {
30 return new AuthorizeSource();
31 }
32
37 public override async Task Execute(EvaluationArguments Arguments)
38 {
39 object Source = await this.Source.Evaluate(Arguments);
40 if (!(Source is string SourceString))
41 throw new Exception("Expected text source.");
42
43 Arguments.AddSource(SourceString);
44 }
45 }
46}
override IStateMachineNode Create()
Creates a new node of the corresponding type.
override async Task Execute(EvaluationArguments Arguments)
Evaluates the action node
AuthorizeSource()
Authorizes a source to perform external notes.
Contains information required for evaluating script in a state-machine.
void AddSource(CaseInsensitiveString Source)
Adds an authorization.
Task< object > Evaluate(EvaluationArguments Arguments)
Evaluates the value node.
Definition: Value.cs:146