ILease.Renew(TimeSpan) 方法

定义

将租约续订指定的时间。Renews a lease for the specified time.

public:
 TimeSpan Renew(TimeSpan renewalTime);
public TimeSpan Renew (TimeSpan renewalTime);
[System.Security.SecurityCritical]
public TimeSpan Renew (TimeSpan renewalTime);
abstract member Renew : TimeSpan -> TimeSpan
[<System.Security.SecurityCritical>]
abstract member Renew : TimeSpan -> TimeSpan
Public Function Renew (renewalTime As TimeSpan) As TimeSpan

参数

renewalTime
TimeSpan

租约的续订期时间长度。The length of time to renew the lease by.

返回

TimeSpan

该租约新的到期时间。The new expiration time of the lease.

属性

例外

直接调用方通过引用接口进行调用,且没有基础结构权限。The immediate caller makes the call through a reference to the interface and does not have infrastructure permission.

注解

租约时间设置为 CurrentLeaseTime 或当前时间加上续订时间的最大值。The lease time is set to the maximum of the CurrentLeaseTime or the current time plus the renewal time.

适用于