Method EvaluateAsync
EvaluateAsync(IEnumerable<KeyValuePair<String, Object>>)
Evaluates the script using the supplied profile variables.
Declaration
public Task<ArcadeEvaluationResult> EvaluateAsync(IEnumerable<KeyValuePair<string, object>> profileVariables)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<System.Collections.Generic.KeyValuePair<System.String, System.Object>> | profileVariables | The profile variables for the script as a collection of key/value pairs. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ArcadeEvaluationResult> | A task object representing the asynchronous evaluation of an Arcade script. The value of the task result is an ArcadeEvaluationResult object. |
Remarks
Each entry of the profile variables dictionary is placed into the interpreter as a value accessible throughout the script. The name and type of these should comply with the profile the ArcadeEvaluator has been constructed with. Values are not persisted across evaluations, meaning all required profile variables must be supplied with each evaluation.
Each value of a key/value pair in the dictionary is converted to a type understood by the interpreter.
Values in the dictionary can be any of the following types:
- System.String.
- Numbers, integer and floating point types of various sizes. Arcade uses doubles for all internal calculations.
- Boolean.
- System.DateTime.
- DateOnly.
- TimeOnly.
- System.DateTimeOffset.
- Geometry.
- GeoElement (or anything derived from it such as Feature).
- FeatureTable.
- System.Collections.Generic.Dictionary<TKey, TValue>, System.String to supported types.
- Geodatabase.
- ServiceGeodatabase.
- GeoModel (or anything derived from it such as Map or Scene).
- Location.
To be explicit on the conversions of compound types.
- GeoElement types are converted to an Arcade Feature type.
- Location is converted to an Arcade Feature type.
- FeatureTable types are converted to an Arcade FeatureSet type.
- Geodatabase is converted to Arcade FeatureSetCollection type.
- ServiceGeodatabase is converted to Arcade FeatureSetCollection type.
- GeoModel is converted to an Arcade FeatureSetCollection type.
Exceptions
Type | Condition |
---|---|
System.ArgumentNullException |
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 100.14 - 200.5 |
.NET | 100.14 - 200.5 |
.NET Windows | 100.14 - 200.5 |
.NET Android | 200.2 - 200.5 |
.NET iOS | 200.0 - 200.5 |
.NET Framework | 100.14 - 200.5 |
Xamarin.Android | 100.14 |
Xamarin.iOS | 100.14 - 100.15 |
UWP | 100.14 - 200.5 |