Click or drag to resize

DynamicTaskBuilderCreateDynamicTask Method

Creates a dynamically generated task class by overriding the specified method.

Namespace: Ookii.Jumbo.Jet.Jobs.Builder
Assembly: Ookii.Jumbo.Jet (in Ookii.Jumbo.Jet.dll) Version: 0.3.0+dc1307f20e065bb638e0b73a34cd216f57e486f1
Syntax
public Type CreateDynamicTask(
	MethodInfo methodToOverride,
	Delegate taskMethodDelegate,
	int skipParameters,
	RecordReuseMode recordReuseMode
)

Parameters

methodToOverride  MethodInfo
The method to override.
taskMethodDelegate  Delegate
Delegate for the method that the implementation of methodToOverride will call.
skipParameters  Int32
The number of parameters of methodToOverride to skip before passing parameters on to the delegate method.
recordReuseMode  RecordReuseMode
The record reuse mode.

Return Value

Type
The Type instance for the dynamically generated type.
Remarks

The DeclaringType of methodToOverride will become the base type of the dynamic task type. If the DeclaringType is an interface, the base type will be Configurable and the type will implement the specified interface. The interface or base type may not have any other methods that need to be overridden.

The target method for taskMethodDelegate must match the signature of the methodToOverride, minus skipParameters parameters at the start. It may optionally take an additional parameter of type TaskContext.

The target method for taskMethodDelegate must be a public static method. Note that lambda expressions never create a public static method, even if they capture no state or the static keyword is used.

If recordReuseMode is Default and the target method has the AllowRecordReuseAttribute attribute applied to it, that attribute will be copied to the task class. If the target method has the ProcessAllInputPartitionsAttribute attribute applied to it, that attribute will be copied to the task class.

See Also