Share via


Package.IServiceContainer.AddService Method (Type, Object)

This API supports the .NET Framework infrastructure and is not intended to be used directly from your code.

Adds the given service to the VSPackage's service container.

Namespace:  Microsoft.VisualStudio.Shell
Assembly:  Microsoft.VisualStudio.Shell.10.0 (in Microsoft.VisualStudio.Shell.10.0.dll)

Syntax

'Declaration
Private Sub AddService ( _
    serviceType As Type, _
    serviceInstance As Object _
) Implements IServiceContainer.AddService
void IServiceContainer.AddService(
    Type serviceType,
    Object serviceInstance
)
private:
virtual void AddService(
    Type^ serviceType, 
    Object^ serviceInstance
) sealed = IServiceContainer::AddService
private abstract AddService : 
        serviceType:Type * 
        serviceInstance:Object -> unit 
private override AddService : 
        serviceType:Type * 
        serviceInstance:Object -> unit 
JScript does not support explicit interface implementations.

Parameters

  • serviceType
    Type: System.Type
    Type of service to add.

Implements

IServiceContainer.AddService(Type, Object)

.NET Framework Security

See Also

Reference

Package Class

AddService Overload

Microsoft.VisualStudio.Shell Namespace