Early Preview
This is currently very much a preview. Please feel free to try things out,
but don't be upset if anything is not yet working. Feedback is welcome over on our
GitHub Dicussions page.
class System.​ComponentModel.​NestedContainer
Assembly: System.ComponentModel.TypeConverter
Inheritance: object → Container → NestedContainer
Implemented Interfaces
- INestedContainer (Inherits: IContainerIDisposable)
Provides the base implementation for the <see cref="T:System.ComponentModel.INestedContainer" /> interface, which enables containers to have an owning component.
Properties
public
IComponent
Owner
Gets the owning component for this nested container.
protected
string
OwnerName
Gets the name of the owning component.
public
ComponentCollection
Components
Gets all the components in the <see cref="T:System.ComponentModel.Container" /> .
Methods
protected
ISite
CreateSite​(IComponent component,
string name)
Creates a site for the component within the container.
Returns The newly created <see cref="T:System.ComponentModel.ISite" /> .
component
The <see cref="T:System.ComponentModel.IComponent" /> to create a site for.
name
The name to assign to <paramref name="component" /> , or <see langword="null" /> to skip the name assignment.
protected
void
Dispose​(bool disposing)
Releases the resources used by the nested container.
disposing
<see langword="true" /> to release both managed and unmanaged resources; <see langword="false" /> to release only unmanaged resources.
protected
object
GetService​(Type service)
Gets the service object of the specified type, if it is available.
Returns An <see cref="T:System.Object" /> that implements the requested service, or <see langword="null" /> if the service cannot be resolved.
service
The <see cref="T:System.Type" /> of the service to retrieve.
public
void
Add​(IComponent component)
Inherited from Container
Adds the specified <see cref="T:System.ComponentModel.Component" /> to the <see cref="T:System.ComponentModel.Container" /> . The component is unnamed.
component
The component to add.
public
void
Add​(IComponent component,
string name)
Inherited from Container
Adds the specified <see cref="T:System.ComponentModel.Component" /> to the <see cref="T:System.ComponentModel.Container" /> and assigns it a name.
component
The component to add.
name
The unique, case-insensitive name to assign to the component.
-or-
<see langword="null" /> , which leaves the component unnamed.
public
void
Dispose​()
Inherited from Container
Releases all resources used by the <see cref="T:System.ComponentModel.Container" /> .
protected
void
Finalize​()
Inherited from Container
Releases unmanaged resources and performs other cleanup operations before the <see cref="T:System.ComponentModel.Container" /> is reclaimed by garbage collection.
public
void
Remove​(IComponent component)
Inherited from Container
Removes a component from the <see cref="T:System.ComponentModel.Container" /> .
component
The component to remove.
protected
void
RemoveWithoutUnsiting​(IComponent component)
Inherited from Container
Removes a component from the <see cref="T:System.ComponentModel.Container" /> without setting <see cref="P:System.ComponentModel.IComponent.Site" /> to <see langword="null" /> .
component
The component to remove.
protected
void
ValidateName​(IComponent component,
string name)
Inherited from Container
Determines whether the component name is unique for this container.
component
The named component.
name
The component name to validate.
public
bool
Equals​(object obj)
Inherited from object
public
int
GetHashCode​()
Inherited from object
protected
object
MemberwiseClone​()
Inherited from object
public
string
ToString​()
Inherited from object