DekGenius.com
[ Team LiB ] Previous Section Next Section

Containerdisposable

System.ComponentModel (system.dll)class

This class provides an implementation of the IContainer interface to encapsulate a queue of Component objects.

You can Add() and Remove() components from the queue, and get a collection of all the Components it contains.

When an instance is disposed, it will call Dispose( ) on all the Component objects it owns.

public class Container : IContainer, IDisposable {
// Public Constructors
   public Container();
// Public Instance Properties
   public virtual ComponentCollection Components{get; }
// implements IContainer
// Public Instance Methods
   public virtual void Add(IComponent component);  // implements IContainer
   public virtual void Add(IComponent component, string name);  // implements IContainer
   public void Dispose();  // implements IDisposable
   public virtual void Remove(IComponent component);  // implements IContainer
// Protected Instance Methods
   protected virtual ISite CreateSite(IComponent component, string name);
   protected virtual void Dispose(bool disposing);
   protected override void Finalize();  // overrides object
   protected virtual object GetService(Type service);
}
    [ Team LiB ] Previous Section Next Section