Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DeleteObject.cs
1using System;
5using System.Threading.Tasks;
6
8{
13 {
23 {
24 }
25
29 public override string FunctionName => nameof(DeleteObject);
30
34 public override string[] DefaultArgumentNames => new string[] { "Object" };
35
40 public override bool IsAsynchronous => true;
41
49 {
50 return this.EvaluateScalarAsync(Argument, Variables).Result;
51 }
52
59 public override async Task<IElement> EvaluateScalarAsync(IElement Argument, Variables Variables)
60 {
61 await Database.Delete(Argument.AssociatedObjectValue);
62 return Argument;
63 }
64
65 }
66}
Static interface for database persistence. In order to work, a database provider has to be assigned t...
Definition: Database.cs:19
static async Task Delete(object Object)
Deletes an object in the database.
Definition: Database.cs:717
Class managing a script expression.
Definition: Expression.cs:39
Base class for funcions of one scalar variable.
ScriptNode Argument
Function argument.
Base class for all nodes in a parsed script tree.
Definition: ScriptNode.cs:69
int Length
Length of expression covered by node.
Definition: ScriptNode.cs:101
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Deletes an object from the object database.
Definition: DeleteObject.cs:13
DeleteObject(ScriptNode Argument, int Start, int Length, Expression Expression)
Deletes an object from the object database.
Definition: DeleteObject.cs:21
override IElement EvaluateScalar(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: DeleteObject.cs:48
override string[] DefaultArgumentNames
Default Argument names
Definition: DeleteObject.cs:34
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
Definition: DeleteObject.cs:40
override string FunctionName
Name of the function
Definition: DeleteObject.cs:29
override async Task< IElement > EvaluateScalarAsync(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: DeleteObject.cs:59
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20