Redigera

Dela via


ILease.Register Method

Definition

Registers a sponsor for the lease.

Overloads

Register(ISponsor)

Registers a sponsor for the lease without renewing the lease.

Register(ISponsor, TimeSpan)

Registers a sponsor for the lease, and renews it by the specified TimeSpan.

Register(ISponsor)

Registers a sponsor for the lease without renewing the lease.

public:
 void Register(System::Runtime::Remoting::Lifetime::ISponsor ^ obj);
public void Register (System.Runtime.Remoting.Lifetime.ISponsor obj);
[System.Security.SecurityCritical]
public void Register (System.Runtime.Remoting.Lifetime.ISponsor obj);
abstract member Register : System.Runtime.Remoting.Lifetime.ISponsor -> unit
[<System.Security.SecurityCritical>]
abstract member Register : System.Runtime.Remoting.Lifetime.ISponsor -> unit
Public Sub Register (obj As ISponsor)

Parameters

obj
ISponsor

The callback object of the sponsor.

Attributes

Exceptions

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

Remarks

If a sponsor is registered with the current method, the lease is not renewed.

Applies to

Register(ISponsor, TimeSpan)

Registers a sponsor for the lease, and renews it by the specified TimeSpan.

public:
 void Register(System::Runtime::Remoting::Lifetime::ISponsor ^ obj, TimeSpan renewalTime);
public void Register (System.Runtime.Remoting.Lifetime.ISponsor obj, TimeSpan renewalTime);
[System.Security.SecurityCritical]
public void Register (System.Runtime.Remoting.Lifetime.ISponsor obj, TimeSpan renewalTime);
abstract member Register : System.Runtime.Remoting.Lifetime.ISponsor * TimeSpan -> unit
[<System.Security.SecurityCritical>]
abstract member Register : System.Runtime.Remoting.Lifetime.ISponsor * TimeSpan -> unit
Public Sub Register (obj As ISponsor, renewalTime As TimeSpan)

Parameters

obj
ISponsor

The callback object of the sponsor.

renewalTime
TimeSpan

The length of time to renew the lease by.

Attributes

Exceptions

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

Applies to