EvaluateAsync(string, IMetadata) Method
Compiles, caches, and evaluates a script.

Syntax

public virtual Task<object> EvaluateAsync(string code, IMetadata metadata)

Remarks

The script compilation is cached, so as long as the script remains the same it will not need to be recompiled.

Parameters

Name Type Description
code string The code to compile.
metadata IMetadata The metadata used to construct the script. Metadata items are exposed a properties with the name of the key and can be used directly in the script.

Return Value

Type Description
Task<object> Raw assembly bytes.