Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
DeleteObject.cs
4using System.Threading.Tasks;
5
7{
12 {
22 {
23 }
24
28 public override string FunctionName => nameof(DeleteObject);
29
33 public override string[] DefaultArgumentNames => new string[] { "Object" };
34
39 public override bool IsAsynchronous => true;
40
48 {
49 return this.EvaluateScalarAsync(Argument, Variables).Result;
50 }
51
58 public override async Task<IElement> EvaluateScalarAsync(IElement Argument, Variables Variables)
59 {
60 await Database.Delete(Argument.AssociatedObjectValue);
61 return Argument;
62 }
63
64 }
65}
Static interface for database persistence. In order to work, a database provider has to be assigned t...
Definition: Database.cs:21
static async Task Delete(object Object)
Deletes an object in the database.
Definition: Database.cs:1291
Class managing a script expression.
Definition: Expression.cs:41
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:12
DeleteObject(ScriptNode Argument, int Start, int Length, Expression Expression)
Deletes an object from the object database.
Definition: DeleteObject.cs:20
override IElement EvaluateScalar(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: DeleteObject.cs:47
override string[] DefaultArgumentNames
Default Argument names
Definition: DeleteObject.cs:33
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
Definition: DeleteObject.cs:39
override string FunctionName
Name of the function
Definition: DeleteObject.cs:28
override async Task< IElement > EvaluateScalarAsync(IElement Argument, Variables Variables)
Evaluates the function on a scalar argument.
Definition: DeleteObject.cs:58
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21