Click or drag to resize
WebFarmHelperRegisterTask Method (Type, Boolean, WebFarmTaskOptimizeActionEnum)
Registers the given web farm task.

Namespace: CMS.Helpers
Assembly: CMS.Helpers (in CMS.Helpers.dll) Version: 12.0.0
Syntax
C#
public static void RegisterTask(
	Type type,
	bool isMemoryTask = false,
	WebFarmTaskOptimizeActionEnum webFarmTaskOptimize = WebFarmTaskOptimizeActionEnum.None
)

Parameters

type
Type: SystemType
Type of the web farm task.
isMemoryTask (Optional)
Type: SystemBoolean
Indicates if the task modifies only memory. Memory tasks can be deleted on application start.
webFarmTaskOptimize (Optional)
Type: CMS.CoreWebFarmTaskOptimizeActionEnum
Determines type of optimization which is used for reducing number of generated web farm tasks of particular type.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrown when type is null.
ArgumentExceptionThrown when type does not inherit WebFarmTaskBase or does not have parameterless constructor.
InvalidOperationExceptionThrown when task with type type has been already registered.
See Also