AsyncPackage.AddService Method

Definition

Overloads

AddService(Type, AsyncServiceCreatorCallback)

Adds an async service to this package. This service will not be visible outside of this package.

AddService(Type, AsyncServiceCreatorWithProgressCallback)

Adds an async service to this package that supports progress updates during initialization. This service will not be visible outside of this package.

AddService(Type, AsyncServiceCreatorCallback, Boolean)

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.

AddService(Type, AsyncServiceCreatorWithProgressCallback, Boolean)

Adds an async service to this package that supports progress updates during initialization. This service may or may not be visible outside of this package, depending on the value of promote.

AddService(Type, AsyncServiceCreatorCallback)

Adds an async service to this package. This service will not be visible outside of this package.

public:
 virtual void AddService(Type ^ serviceType, Microsoft::VisualStudio::Shell::AsyncServiceCreatorCallback ^ callback);
public void AddService (Type serviceType, Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback callback);
abstract member AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback -> unit
override this.AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback -> unit
Public Sub AddService (serviceType As Type, callback As AsyncServiceCreatorCallback)

Parameters

serviceType
Type

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

callback
AsyncServiceCreatorCallback

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

Implements

Applies to

AddService(Type, AsyncServiceCreatorWithProgressCallback)

Adds an async service to this package that supports progress updates during initialization. This service will not be visible outside of this package.

public:
 virtual void AddService(Type ^ serviceType, Microsoft::VisualStudio::Shell::AsyncServiceCreatorWithProgressCallback ^ callback);
public void AddService (Type serviceType, Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback callback);
abstract member AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback -> unit
override this.AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback -> unit
Public Sub AddService (serviceType As Type, callback As AsyncServiceCreatorWithProgressCallback)

Parameters

serviceType
Type

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

callback
AsyncServiceCreatorWithProgressCallback

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

Implements

Applies to

AddService(Type, AsyncServiceCreatorCallback, Boolean)

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.

public:
 virtual void AddService(Type ^ serviceType, Microsoft::VisualStudio::Shell::AsyncServiceCreatorCallback ^ callback, bool promote);
public void AddService (Type serviceType, Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback callback, bool promote);
abstract member AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback * bool -> unit
override this.AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorCallback * bool -> unit
Public Sub AddService (serviceType As Type, callback As AsyncServiceCreatorCallback, promote As Boolean)

Parameters

serviceType
Type

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

callback
AsyncServiceCreatorCallback

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

promote
Boolean

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

Implements

Applies to

AddService(Type, AsyncServiceCreatorWithProgressCallback, Boolean)

Adds an async service to this package that supports progress updates during initialization. This service may or may not be visible outside of this package, depending on the value of promote.

public:
 virtual void AddService(Type ^ serviceType, Microsoft::VisualStudio::Shell::AsyncServiceCreatorWithProgressCallback ^ callback, bool promote);
public void AddService (Type serviceType, Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback callback, bool promote);
abstract member AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback * bool -> unit
override this.AddService : Type * Microsoft.VisualStudio.Shell.AsyncServiceCreatorWithProgressCallback * bool -> unit
Public Sub AddService (serviceType As Type, callback As AsyncServiceCreatorWithProgressCallback, promote As Boolean)

Parameters

serviceType
Type

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

callback
AsyncServiceCreatorWithProgressCallback

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

promote
Boolean

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

Implements

Applies to