AppDomainIsolatedTask.InitializeLifetimeService 方法

定义

重写以赋予从这个类派生的任务无限的租约时间。Overridden to give tasks deriving from this class infinite lease time. 否则,我们最终会获得一个有限的租约(大约 5 分钟),如果任务实例处理时间较长,就会过期。Otherwise we end up with a limited lease (5 minutes I think) and task instances can expire if they take long time processing.

public:
 override System::Object ^ InitializeLifetimeService();
[System.Security.SecurityCritical]
public override object InitializeLifetimeService ();
public override object InitializeLifetimeService ();
[<System.Security.SecurityCritical>]
override this.InitializeLifetimeService : unit -> obj
override this.InitializeLifetimeService : unit -> obj
Public Overrides Function InitializeLifetimeService () As Object

返回

Object

null 可指定无限生存期。null to specify an infinite lifetime.

属性

注解

否则,将产生有限的5分钟租约,如果任务实例花费很长时间进行处理,则它们会过期。Otherwise, a limited lease of 5 minutes will result; and task instances can expire if they take a long time to process.

适用于