WebFarmHelperRegisterTask Method (Type, Boolean, WebFarmTaskOptimizeActionEnum) |
Registers the given web farm task.
Namespace: CMS.HelpersAssembly: CMS.Helpers (in CMS.Helpers.dll) Version: 13.0.131
Syntax 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 Exception | Condition |
---|
ArgumentNullException | Thrown when type is null. |
ArgumentException | Thrown when type does not inherit WebFarmTaskBase or does not have parameterless constructor. |
InvalidOperationException | Thrown when task with type type has been already registered. |
See Also