ExpressionServices.TryConvert<TResult> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Converts a workflow environment-aware expression to an activity tree.
public:
generic <typename TResult>
static bool TryConvert(System::Linq::Expressions::Expression<Func<System::Activities::ActivityContext ^, TResult> ^> ^ expression, [Runtime::InteropServices::Out] System::Activities::Activity<TResult> ^ % result);
public static bool TryConvert<TResult> (System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext,TResult>> expression, out System.Activities.Activity<TResult> result);
static member TryConvert : System.Linq.Expressions.Expression<Func<System.Activities.ActivityContext, 'Result>> * Activity -> bool
Public Shared Function TryConvert(Of TResult) (expression As Expression(Of Func(Of ActivityContext, TResult)), ByRef result As Activity(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<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.