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: 2.0.0
Syntax
public Type CreateDynamicTask(
	MethodInfo methodToOverride,
	Delegate taskMethodDelegate,
	int skipParameters,
	RecordReuseMode recordReuseMode
)

Parameters

methodToOverride
Type: System.ReflectionMethodInfo
The method to override.
taskMethodDelegate
Type: SystemDelegate
Delegate for the method that the implementation of methodToOverride will call.
skipParameters
Type: SystemInt32
The number of parameters of methodToOverride to skip before passing parameters on to the delegate method.
recordReuseMode
Type: Ookii.Jumbo.Jet.Jobs.BuilderRecordReuseMode
The record reuse mode.

Return Value

Type: 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.

If the target method for taskMethodDelegate is not public, you must add the delegate to the setting's for the stage in which this task is used by using the SerializeDelegate(SettingsDictionary, Delegate) method.

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