C# Класс System.ComponentModel.Container

Container class: encapsulates components.
Наследование: IContainer, IDisposable
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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 .

Защищенные методы

Метод Описание
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.

Приватные методы

Метод Описание
Remove ( IComponent component, bool preserveSite ) : void

Описание методов

Add() публичный Метод

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

public Add ( IComponent component ) : void
component IComponent
Результат void

Add() публичный Метод

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

public Add ( IComponent component, String name ) : void
component IComponent
name String
Результат void

CreateSite() защищенный Метод

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
Результат ISite

Dispose() публичный Метод

Disposes of the .

public Dispose ( ) : void
Результат void

Dispose() защищенный Метод

protected Dispose ( bool disposing ) : void
disposing bool
Результат void

GetService() защищенный Метод

[To be supplied.]

protected GetService ( Type service ) : object
service Type
Результат object

Remove() публичный Метод

Removes a component from the .

public Remove ( IComponent component ) : void
component IComponent
Результат void

RemoveWithoutUnsiting() защищенный Метод

protected RemoveWithoutUnsiting ( IComponent component ) : void
component IComponent
Результат void

ValidateName() защищенный Метод

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
Результат void