C# Class System.ComponentModel.Container

Container class: encapsulates components.
Inheritance: IContainer, IDisposable
Afficher le fichier Open project: dotnet/corefx Class Usage Examples

Méthodes publiques

Méthode Description
Add ( IComponent component ) : void

Adds the specified component to the . The component is unnamed.

Add ( IComponent component, String name ) : void

Adds the specified component to the and assigns a name to it.

Dispose ( ) : void

Disposes of the .

Remove ( IComponent component ) : void

Removes a component from the .

Méthodes protégées

Méthode Description
CreateSite ( IComponent component, string name ) : ISite

Creates a Site for the given and assigns the given name to the site.

Dispose ( bool disposing ) : void
GetService ( Type service ) : object

[To be supplied.]

RemoveWithoutUnsiting ( IComponent component ) : void
ValidateName ( IComponent component, string name ) : void

Validates that the given name is valid for a component. The default implementation verifies that name is either null or unique compared to the names of other components in the container.

Private Methods

Méthode Description
Remove ( IComponent component, bool preserveSite ) : void

Method Details

Add() public méthode

Adds the specified component to the . The component is unnamed.

public Add ( IComponent component ) : void
component IComponent
Résultat void

Add() public méthode

Adds the specified component to the and assigns a name to it.

public Add ( IComponent component, String name ) : void
component IComponent
name String
Résultat void

CreateSite() protected méthode

Creates a Site for the given and assigns the given name to the site.

protected CreateSite ( IComponent component, string name ) : ISite
component IComponent
name string
Résultat ISite

Dispose() public méthode

Disposes of the .

public Dispose ( ) : void
Résultat void

Dispose() protected méthode

protected Dispose ( bool disposing ) : void
disposing bool
Résultat void

GetService() protected méthode

[To be supplied.]

protected GetService ( Type service ) : object
service Type
Résultat object

Remove() public méthode

Removes a component from the .

public Remove ( IComponent component ) : void
component IComponent
Résultat void

RemoveWithoutUnsiting() protected méthode

protected RemoveWithoutUnsiting ( IComponent component ) : void
component IComponent
Résultat void

ValidateName() protected méthode

Validates that the given name is valid for a component. The default implementation verifies that name is either null or unique compared to the names of other components in the container.
protected ValidateName ( IComponent component, string name ) : void
component IComponent
name string
Résultat void