Click or drag to resize
BackgroundJobClientExtensionsEnqueue Method (IBackgroundJobClient, ExpressionAction)
Creates a background job based on a specified static method call expression and places it into its actual queue. Please, see the QueueAttribute to learn how to place the job on a non-default queue.

Namespace: Hangfire
Assembly: Hangfire.Core (in Hangfire.Core.dll) Version: 1.5.0.0
Syntax
public static string Enqueue(
	[NotNullAttribute] this IBackgroundJobClient client,
	[NotNullAttribute][InstantHandleAttribute] Expression<Action> methodCall
)

Parameters

client
Type: HangfireIBackgroundJobClient
A job client instance.
methodCall
Type: System.Linq.ExpressionsExpressionAction
Static method call expression that will be marshalled to the Server.

Return Value

Type: String
Unique identifier of the created job.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IBackgroundJobClient. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
See Also