Package.IServiceContainer.AddService Package.IServiceContainer.AddService Package.IServiceContainer.AddService Package.IServiceContainer.AddService Method

Definition

Overloads

IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object)

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

IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean) IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean) IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

Adds the given service to the service container by means of the specified ServiceCreatorCallback.

IServiceContainer.AddService(Type, ServiceCreatorCallback) IServiceContainer.AddService(Type, ServiceCreatorCallback) IServiceContainer.AddService(Type, ServiceCreatorCallback)

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

IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean)

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

IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object) IServiceContainer.AddService(Type, Object)

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

 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Type ^ serviceType, System::Object ^ serviceInstance) = System::ComponentModel::Design::IServiceContainer::AddService;
 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Platform::Type ^ serviceType, Platform::Object ^ serviceInstance) = System::ComponentModel::Design::IServiceContainer::AddService;
void IServiceContainer.AddService (Type serviceType, object serviceInstance);
Sub AddService (serviceType As Type, serviceInstance As Object) Implements IServiceContainer.AddService
Parameters
serviceType
Type Type Type Type

Type of service to add.

serviceInstance
Object Object Object Object

Service object.

IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean) IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean) IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

Adds the given service to the service container by means of the specified ServiceCreatorCallback.

 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Type ^ serviceType, System::ComponentModel::Design::ServiceCreatorCallback ^ callback, bool promote) = System::ComponentModel::Design::IServiceContainer::AddService;
void IServiceContainer.AddService (Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback, bool promote);
Sub AddService (serviceType As Type, callback As ServiceCreatorCallback, promote As Boolean) Implements IServiceContainer.AddService
Parameters
serviceType
Type Type Type Type

The type of service to add.

callback
ServiceCreatorCallback ServiceCreatorCallback ServiceCreatorCallback ServiceCreatorCallback

ServiceCreatorCallback 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.

promote
Boolean Boolean Boolean Boolean

true if this service should be added to any parent service containers; otherwise, false.

IServiceContainer.AddService(Type, ServiceCreatorCallback) IServiceContainer.AddService(Type, ServiceCreatorCallback) IServiceContainer.AddService(Type, ServiceCreatorCallback)

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

 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Type ^ serviceType, System::ComponentModel::Design::ServiceCreatorCallback ^ callback) = System::ComponentModel::Design::IServiceContainer::AddService;
void IServiceContainer.AddService (Type serviceType, System.ComponentModel.Design.ServiceCreatorCallback callback);
Sub AddService (serviceType As Type, callback As ServiceCreatorCallback) Implements IServiceContainer.AddService
Parameters
serviceType
Type Type Type Type

Type of service to add.

callback
ServiceCreatorCallback ServiceCreatorCallback ServiceCreatorCallback ServiceCreatorCallback

ServiceCreatorCallback 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.

IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean) IServiceContainer.AddService(Type, Object, Boolean)

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

 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Type ^ serviceType, System::Object ^ serviceInstance, bool promote) = System::ComponentModel::Design::IServiceContainer::AddService;
 virtual void System.ComponentModel.Design.IServiceContainer.AddService(Platform::Type ^ serviceType, Platform::Object ^ serviceInstance, bool promote) = System::ComponentModel::Design::IServiceContainer::AddService;
void IServiceContainer.AddService (Type serviceType, object serviceInstance, bool promote);
Sub AddService (serviceType As Type, serviceInstance As Object, promote As Boolean) Implements IServiceContainer.AddService
Parameters
serviceType
Type Type Type Type

Type of service to add.

serviceInstance
Object Object Object Object

Service object.

promote
Boolean Boolean Boolean Boolean

true if this service should be added to any parent service containers; otherwise, false.

Applies to