AsyncPackage::AddService Method (Type^, AsyncServiceCreatorCallback^, Boolean)

Visual Studio 2015
 

Adds an async service to this package. This service may or may not be visible outside of this package, depending on the value of promote.

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

public:
virtual void AddService(
	Type^ serviceType,
	AsyncServiceCreatorCallback^ callback,
	bool promote
) sealed

Parameters

serviceType
Type: System::Type^

The service type to be used as the identifier used for retrieving this service.

callback
Type: Microsoft.VisualStudio.Shell::AsyncServiceCreatorCallback^

The creation callback to be invoked when an instance of the service is needed. This is invoked only one time and the result is cached.

promote
Type: System::Boolean

True if this service should be visible outside this package, otherwise false.

Return to top
Show: