IVsService<TService,TInterface> Interface

Definition

Provides access to a Visual Studio proffered service.

public interface IVsService<TService,TInterface> : Microsoft.VisualStudio.IVsService<TInterface> where TService : class where TInterface : class
type IVsService<'Service, 'Interface (requires 'Service : null and 'Interface : null)> = interface
    interface IVsService<'Interface (requires 'Interface : null)>
Public Interface IVsService(Of TService, TInterface)
Implements IVsService(Of TInterface)

Type Parameters

TService

The service identity of the Visual Studio service.

TInterface

The initial interface used to interact with the Visual Studio service.

Implements
IVsService<TInterface>

Remarks

This service acquiring interface is typically acquired via a MEF import attribute. For example: [Import] IVsService<SVsRunningDocumentTable, IVsRunningDocumentTable> rdt;

When TService and TInterface are the same type, the IVsService<T> interface is a simpler option.

Methods

GetValueAsync(CancellationToken)

Gets an instance of the T service.

(Inherited from IVsService<T>)
GetValueOrNullAsync(CancellationToken)

Gets an instance of the T service.

(Inherited from IVsService<T>)

Applies to