ILease.Renew Method (TimeSpan)

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Renews a lease for the specified time.

Namespace:   System.Runtime.Remoting.Lifetime
Assembly:  mscorlib (in mscorlib.dll)

[SecurityCriticalAttribute]
TimeSpan Renew(
	TimeSpan renewalTime
)

Parameters

renewalTime
Type: System.TimeSpan

The length of time to renew the lease by.

Return Value

Type: System.TimeSpan

The new expiration time of the lease.

Exception Condition
SecurityException

The immediate caller makes the call through a reference to the interface and does not have infrastructure permission.

The lease time is set to the maximum of the CurrentLeaseTime or the current time plus the renewal time.

SecurityPermission

for operating with infrastructure code. Demand value: SecurityAction.LinkDemand; Permission value: SecurityPermissionFlag.Infrastructure

.NET Framework
Available since 1.1
Return to top
Show: