Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
PreprocessHtmlx.cs
1using System.Threading.Tasks;
3using Waher.Script;
7
9{
14 {
23 : base(Htmlx, Start, Length, Expression)
24 {
25 }
26
30 public override string FunctionName => nameof(PreprocessHtmlx);
31
36 public override bool IsAsynchronous => true;
37
45 {
46 return this.EvaluateScalarAsync(Argument, Variables).Result;
47 }
48
55 public override async Task<IElement> EvaluateScalarAsync(string Argument, Variables Variables)
56 {
57 Argument = await HtmlxToHtml.Convert(Argument, null, Variables, string.Empty, false);
58 return new StringValue(Argument);
59 }
60
61 }
62}
Converts HTMLX-files to HTML, by evaluating emebedded script and replacing it with results.
Definition: HtmlxToHtml.cs:21
static Task< string > Convert(string Htmlx, ConversionState State, string FileName)
Converts HTMLX to HTML, using the current theme
Definition: HtmlxToHtml.cs:137
override async Task< IElement > EvaluateScalarAsync(string Argument, Variables Variables)
Evaluates the function on a scalar argument.
override IElement EvaluateScalar(string Argument, Variables Variables)
Evaluates the function on a scalar argument.
override bool IsAsynchronous
If the node (or its decendants) include asynchronous evaluation. Asynchronous nodes should be evaluat...
PreprocessHtmlx(ScriptNode Htmlx, int Start, int Length, Expression Expression)
PreprocessHtmlx(Htmlx)
Class managing a script expression.
Definition: Expression.cs:41
Base class for funcions of one scalar string 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
Collection of variables.
Definition: Variables.cs:25
Basic interface for all types of elements.
Definition: IElement.cs:21