Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
RemoveFtsProperties.cs
1using System.Threading.Tasks;
7
9{
14 {
23 public RemoveFtsProperties(ScriptNode Collection, ScriptNode Properties,
25 : base(new ScriptNode[] { Collection, Properties },
26 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Vector },
28 {
29 }
30
34 public override string FunctionName => nameof(RemoveFtsProperties);
35
39 public override string[] DefaultArgumentNames => new string[]
40 {
41 "Collection", "Properties"
42 };
43
48 public override bool IsAsynchronous => true;
49
57 {
58 return this.EvaluateAsync(Arguments, Variables).Result;
59 }
60
67 public override async Task<IElement> EvaluateAsync(IElement[] Arguments, Variables Variables)
68 {
69 string Collection = Arguments[0].AssociatedObjectValue?.ToString() ?? string.Empty;
71
72 bool Result = await Waher.Persistence.FullTextSearch.Search.RemoveFullTextSearch(Collection, Properties);
73
74 return Result ? BooleanValue.True : BooleanValue.False;
75 }
76 }
77}
Static class for access to Full-Text-Search
Definition: Search.cs:68
static Task< bool > RemoveFullTextSearch(string CollectionName, params PropertyDefinition[] Properties)
Removes properties from full-text-search indexation.
Definition: Search.cs:264
Class managing a script expression.
Definition: Expression.cs:39
Adds collection properties to the corresponding index for full-text-searching.
static PropertyDefinition[] GetPropertyDefinitions(IElement Argument, ScriptNode Node)
Gets property definitions.
Removes collection properties from the corresponding index for full-text-searching.
RemoveFtsProperties(ScriptNode Collection, ScriptNode Properties, int Start, int Length, Expression Expression)
Removes collection properties from the corresponding index for full-text-searching.
override string[] DefaultArgumentNames
Default Argument names
override IElement Evaluate(IElement[] Arguments, Variables Variables)
Evaluates the function.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
override async Task< IElement > EvaluateAsync(IElement[] Arguments, Variables Variables)
Evaluates the function.
Base class for multivariate funcions.
ScriptNode[] Arguments
Function arguments.
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
override string ToString()
Definition: ScriptNode.cs:359
Expression Expression
Expression of which the node is a part.
Definition: ScriptNode.cs:177
int Start
Start position in script expression.
Definition: ScriptNode.cs:92
Boolean-valued number.
Definition: BooleanValue.cs:12
static readonly BooleanValue False
Constant false value.
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:20
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9
Definition: App.xaml.cs:4