Share via


Expression.TryEvaluate Method

Definition

Overloads

TryEvaluate(IMemory, Options)

Evaluate the expression.

TryEvaluate(Object, Options)

Evaluate the expression.

TryEvaluate<T>(IMemory, Options)

Evaluate the expression.

TryEvaluate<T>(Object, Options)

Evaluate the expression.

TryEvaluate(IMemory, Options)

Evaluate the expression.

public (object value, string error) TryEvaluate (AdaptiveExpressions.Memory.IMemory state, AdaptiveExpressions.Options options = default);
member this.TryEvaluate : AdaptiveExpressions.Memory.IMemory * AdaptiveExpressions.Options -> ValueTuple<obj, string>
Public Function TryEvaluate (state As IMemory, Optional options As Options = Nothing) As ValueTuple(Of Object, String)

Parameters

state
IMemory

Global state to evaluate accessor expressions against. Can be IDictionary<TKey,TValue>, IDictionary otherwise reflection is used to access property and then indexer.

options
Options

Options used in the evaluation.

Returns

Computed value and an error string. If the string is non-null, then there was an evaluation error.

Applies to

TryEvaluate(Object, Options)

Evaluate the expression.

public (object value, string error) TryEvaluate (object state, AdaptiveExpressions.Options options = default);
member this.TryEvaluate : obj * AdaptiveExpressions.Options -> ValueTuple<obj, string>
Public Function TryEvaluate (state As Object, Optional options As Options = Nothing) As ValueTuple(Of Object, String)

Parameters

state
Object

Global state to evaluate accessor expressions against. Can be IDictionary<TKey,TValue>, IDictionary otherwise reflection is used to access property and then indexer.

options
Options

Options used in the evaluation.

Returns

Computed value and an error string. If the string is non-null, then there was an evaluation error.

Applies to

TryEvaluate<T>(IMemory, Options)

Evaluate the expression.

public (T value, string error) TryEvaluate<T> (AdaptiveExpressions.Memory.IMemory state, AdaptiveExpressions.Options options = default);
member this.TryEvaluate : AdaptiveExpressions.Memory.IMemory * AdaptiveExpressions.Options -> ValueTuple<'T, string>
Public Function TryEvaluate(Of T) (state As IMemory, Optional options As Options = Nothing) As ValueTuple(Of T, String)

Type Parameters

T

type of result of the expression.

Parameters

state
IMemory

Global state to evaluate accessor expressions against. Can be IDictionary<TKey,TValue>, IDictionary otherwise reflection is used to access property and then indexer.

options
Options

Options used in the evaluation.

Returns

Computed value and an error string. If the string is non-null, then there was an evaluation error.

Applies to

TryEvaluate<T>(Object, Options)

Evaluate the expression.

public (T value, string error) TryEvaluate<T> (object state, AdaptiveExpressions.Options options = default);
member this.TryEvaluate : obj * AdaptiveExpressions.Options -> ValueTuple<'T, string>
Public Function TryEvaluate(Of T) (state As Object, Optional options As Options = Nothing) As ValueTuple(Of T, String)

Type Parameters

T

type of result of the expression.

Parameters

state
Object

Global state to evaluate accessor expressions against. Can be IDictionary<TKey,TValue>, IDictionary otherwise reflection is used to access property and then indexer.

options
Options

Options used in the evaluation.

Returns

Computed value and an error string. If the string is non-null, then there was an evaluation error.

Applies to