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.12.0 (in Microsoft.VisualStudio.Shell.12.0.dll)
Syntax
'Declaration
Private Sub AddService ( _
serviceType As Type, _
callback As ServiceCreatorCallback _
) Implements IServiceContainer.AddService
void IServiceContainer.AddService(
Type serviceType,
ServiceCreatorCallback callback
)
private:
virtual void AddService(
Type^ serviceType,
ServiceCreatorCallback^ callback
) sealed = IServiceContainer::AddService
private abstract AddService :
serviceType:Type *
callback:ServiceCreatorCallback -> unit
private override AddService :
serviceType:Type *
callback:ServiceCreatorCallback -> unit
JScript does not support explicit interface implementations.
Parameters
serviceType
Type: TypeType of service to add.
callback
Type: ServiceCreatorCallbackServiceCreatorCallback that can create the service. This allows a service to be declared as available, but delays creation of the object until the service is requested.
Implements
IServiceContainer.AddService(Type, ServiceCreatorCallback)
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.