Redigera

Dela via


ExpressionServices.TryConvertReference<TResult> Method

Definition

Converts a reference to a workflow environment-aware expression to an activity tree.

public:
generic <typename TResult>
 static bool TryConvertReference(System::Linq::Expressions::Expression<Func<System::Activities::ActivityContext ^, TResult> ^> ^ expression, [Runtime::InteropServices::Out] System::Activities::Activity<System::Activities::Location<TResult> ^> ^ % result);
public static bool TryConvertReference<TResult> (System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext,TResult>> expression, out System.Activities.Activity<System.Activities.Location<TResult>> result);
static member TryConvertReference : System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext, 'Result>> * Activity -> bool
Public Shared Function TryConvertReference(Of TResult) (expression As Expression(Of Func(Of ActivityContext, TResult)), ByRef result As Activity(Of Location(Of TResult))) As Boolean

Type Parameters

TResult

The type the expression is being converted to.

Parameters

expression
Expression<Func<ActivityContext,TResult>>

The expression being converted.

result
Activity<Location<TResult>>

The converted expression.

Returns

true if the expression can be converted; otherwise, false.

Remarks

The conversion methods in ExpressionServices are designed to work with variables and constants defined inside the workflow, or passed into the workflow via arguments.

Applies to