mscorlib [00 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00] 1.0.5000.0 2.0.0.0 4.0.0.0 Gtk# is thread aware, but not thread safe; See the <link location="node:gtk-sharp/programming/threads">Gtk# Thread Programming</link> for details. System.Runtime.InteropServices.ComVisible(true)

Distributed garbage collection controls when server applications can be deleted. Traditionally, distributed garbage collection uses reference counts and pinging for control. This works well when there are a few clients per object, but does not work well when there are thousands of clients per each object. The lifetime service can assume the function of a traditional distributed garbage collector, and scales well when the number of clients increases.

The lifetime service associates a lease with each remotely activated object. When the lease expires, the object is removed. A lease can specify that an object has an infinite lifetime.

Each contains a lease manager that administers the leases in the domain. The lease manager periodically examines the leases for time expiration. If a lease has expired, it can either be canceled by removing its reference to the lease, or renewed by invoking one or more of the lease's sponsors.

A lease contains properties that determine its policies, and methods that renew the lease time. The lease exposes the interface.

For an example showing how to use the interface see Lifetimes.

Defines a lifetime lease object that is used by the remoting lifetime service.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TimeSpan To be added: an object of type 'TimeSpan' To be added

  Gets the amount of time remaining on the lease.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Runtime.Remoting.Lifetime.LeaseState To be added: an object of type 'LeaseState' To be added

  Gets the current of the lease.

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TimeSpan To be added.

  If the property is set to , then the lease will never time out and the object associated with it will have an infinite lifetime.

  Gets or sets the initial time for the lease.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void ``

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

  Registers a sponsor for the lease without renewing the lease.

  The callback object of the sponsor.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` `` To be added

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

  The callback object of the sponsor. The length of time to renew the lease by.
- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TimeSpan ``

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

  Renews a lease for the specified time.

  The new expiration time of the lease.

  The length of time to renew the lease by.
- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TimeSpan To be added.

  When you make a call to a remote object, the lifetime service adds the to the only if the has dropped below the . Sequential calls therefore do not increase the without bound. Instead, immediately after any call, the is guaranteed to be the or longer.

  Gets or sets the amount of time by which a call to the remote object renews the .

- Property
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.TimeSpan To be added.

  If the is , then this lease will not take sponsors.

  If a sponsor does not respond to a call to renew a lease within the time-out period, it is assumed to be dead and is removed from the list of sponsors for the current lease.

  Gets or sets the amount of time to wait for a sponsor to return with a lease renewal time.

- Method
  1.0.5000.0
  2.0.0.0
  4.0.0.0
  System.Void `` To be added

  Removes a sponsor from the sponsor list.

  After this method is called, the lease state changes to expired and the object is collected by the garbage collector.

  The lease sponsor to unregister.