Container Container Container Container Class

Definition

Encapsula cero o más componentes. Encapsulates zero or more components.

public ref class Container : IDisposable, System::ComponentModel::IContainer
public class Container : IDisposable, System.ComponentModel.IContainer
type Container = class
    interface IContainer
    interface IDisposable
Public Class Container
Implements IContainer, IDisposable
Inheritance
ContainerContainerContainerContainer
Derived
Implements

Remarks

El Container clase es la implementación predeterminada para el IContainer interfaz.The Container class is the default implementation for the IContainer interface.

Los contenedores son objetos que encapsulan y realizar un seguimiento de cero o más componentes.Containers are objects that encapsulate and track zero or more components. En este contexto, contención hace referencia a una contención lógica, no visual.In this context, containment refers to logical containment, not visual containment. Puede usar los componentes y contenedores en una variedad de escenarios, incluidos los escenarios visuales y no visual.You can use components and containers in a variety of scenarios, including scenarios that are both visual and not visual.

Se realiza un seguimiento de los componentes en un contenedor en una lista de ENTRAR, primero en, que también define el orden de los componentes dentro del contenedor.The components in a container are tracked in a first-in, first-out list, which also defines the order of the components within the container. Componentes agregados se anexan al final de la lista.Added components are appended to the end of the list.

Constructors

Container() Container() Container() Container()

Inicializa una nueva instancia de la clase Container. Initializes a new instance of the Container class.

Properties

Components Components Components Components

Obtiene todos los componentes de Container. Gets all the components in the Container.

Methods

Add(IComponent) Add(IComponent) Add(IComponent) Add(IComponent)

Agrega el objeto Component especificado a la colección Container. Adds the specified Component to the Container. El componente no tiene nombre. The component is unnamed.

Add(IComponent, String) Add(IComponent, String) Add(IComponent, String) Add(IComponent, String)

Agrega el Component especificado a Container y le asigna un nombre. Adds the specified Component to the Container and assigns it a name.

CreateSite(IComponent, String) CreateSite(IComponent, String) CreateSite(IComponent, String) CreateSite(IComponent, String)

Crea un sitio ISite para la IComponent especificada y le asigna el nombre determinado al sitio. Creates a site ISite for the given IComponent and assigns the given name to the site.

Dispose() Dispose() Dispose() Dispose()

Libera todos los recursos que usa Container. Releases all resources used by the Container.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Libera los recursos no administrados utilizados por el objeto Container y, de forma opcional, libera los recursos administrados. Releases the unmanaged resources used by the Container, and optionally releases the managed resources.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determina si el objeto especificado es igual al objeto actual. Determines whether the specified object is equal to the current object.

(Inherited from Object)
Finalize() Finalize() Finalize() Finalize()

Libera recursos no administrados y realiza otras operaciones de limpieza antes de que se reclame el elemento Container durante la recolección de elementos no usados. Releases unmanaged resources and performs other cleanup operations before the Container is reclaimed by garbage collection.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Sirve como la función hash predeterminada. Serves as the default hash function.

(Inherited from Object)
GetService(Type) GetService(Type) GetService(Type) GetService(Type)

Obtiene el objeto de servicio del tipo especificado, si está disponible. Gets the service object of the specified type, if it is available.

GetType() GetType() GetType() GetType()

Obtiene el Type de la instancia actual. Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Crea una copia superficial del Object actual. Creates a shallow copy of the current Object.

(Inherited from Object)
Remove(IComponent) Remove(IComponent) Remove(IComponent) Remove(IComponent)

Quita un componente del objeto Container. Removes a component from the Container.

RemoveWithoutUnsiting(IComponent) RemoveWithoutUnsiting(IComponent) RemoveWithoutUnsiting(IComponent) RemoveWithoutUnsiting(IComponent)

Quita un componente del objeto Container sin establecer Site en null. Removes a component from the Container without setting Site to null.

ToString() ToString() ToString() ToString()

Devuelve una cadena que representa el objeto actual. Returns a string that represents the current object.

(Inherited from Object)
ValidateName(IComponent, String) ValidateName(IComponent, String) ValidateName(IComponent, String) ValidateName(IComponent, String)

Determina si el nombre del componente es único para este contenedor. Determines whether the component name is unique for this container.

Applies to

See Also