Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

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

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

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

void IServiceContainer.AddService(
	Type serviceType,
	ServiceCreatorCallback callback,
	bool promote
)

Parameters

serviceType
Type: System.Type
The type of service to add.
callback
Type: System.ComponentModel.Design.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
Type: System.Boolean
true if this service should be added to any parent service containers; otherwise, false.

Implements

IServiceContainer.AddService(Type, ServiceCreatorCallback, Boolean)

Community Additions

ADD
Show:
© 2015 Microsoft