Click or drag to resize
IWebFarmServiceRegisterTaskT Method (Boolean, WebFarmTaskOptimizeActionEnum)
Registers a new web farm task type to allow its processing within the system. The type must inherit WebFarmTaskBase.

Namespace: CMS.Core
Assembly: CMS.Core (in CMS.Core.dll) Version: 13.0.131
Syntax
C#
void RegisterTask<T>(
	bool isMemoryTask = false,
	WebFarmTaskOptimizeActionEnum webFarmTaskOptimize = WebFarmTaskOptimizeActionEnum.None
)
where T : new(), WebFarmTaskBase

Parameters

isMemoryTask (Optional)
Type: SystemBoolean
Indicates if the task modifies memory only. 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.

Type Parameters

T
Exceptions
ExceptionCondition
ArgumentExceptionThrown when task to be registered does not have parameterless constructor.
InvalidOperationExceptionThrown when task has been already registered.
See Also