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;
6
8{
13 {
22 public RemoveFtsProperties(ScriptNode Collection, ScriptNode Properties,
24 : base(new ScriptNode[] { Collection, Properties },
25 new ArgumentType[] { ArgumentType.Scalar, ArgumentType.Vector },
27 {
28 }
29
33 public override string FunctionName => nameof(RemoveFtsProperties);
34
38 public override string[] DefaultArgumentNames => new string[]
39 {
40 "Collection", "Properties"
41 };
42
47 public override bool IsAsynchronous => true;
48
56 {
57 return this.EvaluateAsync(Arguments, Variables).Result;
58 }
59
66 public override async Task<IElement> EvaluateAsync(IElement[] Arguments, Variables Variables)
67 {
68 string Collection = ToString(Arguments[0]) ?? string.Empty;
70
71 bool Result = await Waher.Persistence.FullTextSearch.Search.RemoveFullTextSearch(Collection, Properties);
72
73 return Result ? BooleanValue.True : BooleanValue.False;
74 }
75 }
76}
Static class for access to Full-Text-Search
Definition: Search.cs:67
static Task< bool > RemoveFullTextSearch(string CollectionName, params PropertyDefinition[] Properties)
Removes properties from full-text-search indexation.
Definition: Search.cs:236
Class managing a script expression.
Definition: Expression.cs:41
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:21
ArgumentType
Type of parameter used in a function definition or a lambda definition.
Definition: IFunction.cs:9
Definition: App.xaml.cs:4