| JobFromExpression Method (ExpressionAction) |
Gets a new instance of the
Job class based on the
given expression tree of a method call.
Namespace: Hangfire.CommonAssembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax public static Job FromExpression(
[InstantHandleAttribute] Expression<Action> methodCall
)
Public Shared Function FromExpression (
<InstantHandleAttribute> methodCall As Expression(Of Action)
) As Job
Parameters
- methodCall
- Type: System.Linq.ExpressionsExpressionAction
Expression tree of a method call.
Return Value
Type:
JobExceptions Remarks The Type property of a returning job will
point to the type of a given instance object when it is specified,
or to the declaring type otherwise. All the arguments are evaluated
using the expression compiler that uses caching where possible to
decrease the performance penalty.
Note |
---|
Instance object (e.g. () => instance.Method()) is
only used to obtain the type for a job. It is not
serialized and not passed across the process boundaries. |
See Also