System.ComponentModel.Design.ServiceContainer Class

Provides a simple implementation of the System.ComponentModel.Design.IServiceContainer interface. This class cannot be inherited.

See Also: ServiceContainer Members

Syntax

public class ServiceContainer : IServiceContainer, IDisposable, IServiceProvider

Remarks

The System.ComponentModel.Design.ServiceContainer object can be used to store and provide services. System.ComponentModel.Design.ServiceContainer implements the System.ComponentModel.Design.IServiceContainer interface.

The System.ComponentModel.Design.ServiceContainer object can be created using a constructor that adds a parent System.ComponentModel.Design.IServiceContainer through which services can be optionally added to or removed from all parent System.ComponentModel.Design.IServiceContainer objects, including the immediate parent System.ComponentModel.Design.IServiceContainer. To add or remove a service from all System.ComponentModel.Design.IServiceContainer implementations that are linked to this System.ComponentModel.Design.IServiceContainer through parenting, call the ServiceContainer.AddService(Type, object) or ServiceContainer.RemoveService(Type) method overload that accepts a Boolean value indicating whether to promote the service request.

Note:

The System.Security.Permissions.HostProtectionAttribute attribute applied to this class has the following System.Security.Permissions.HostProtectionAttribute.Resources property value: System.Security.Permissions.HostProtectionResource.SharedState. The System.Security.Permissions.HostProtectionAttribute does not affect desktop applications (which are typically started by double-clicking an icon, typing a command, or entering a URL in a browser). For more information, see the System.Security.Permissions.HostProtectionAttribute class or SQL Server Programming and Host Protection Attributes.

Requirements

Namespace: System.ComponentModel.Design
Assembly: System (in System.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0, 4.0.0.0