Partilhar via


ServiceProvider Class

Definition

Provides an object that can proffer services using both the managed and unmanaged IServiceProvider interfaces.

public ref class ServiceProvider : IServiceProvider, Microsoft::VisualStudio::OLE::Interop::IServiceProvider
[System.Runtime.InteropServices.ComVisible(true)]
public class ServiceProvider : IServiceProvider, Microsoft.VisualStudio.OLE.Interop.IServiceProvider
[<System.Runtime.InteropServices.ComVisible(true)>]
type ServiceProvider = class
    interface IServiceProvider
    interface IServiceProvider
Public Class ServiceProvider
Implements IServiceProvider, IServiceProvider
Inheritance
ServiceProvider
Derived
Attributes
Implements

Constructors

ServiceProvider()

Class constructor for a managed service provider (IServiceProvider) that is accessible through the unmanaged IServiceProvider interface.

ServiceProvider(IServiceProvider)

Class constructor for wrapping an unmanaged IServiceProvider interface that is accessible through the managed IServiceProvider interface.

Properties

ServiceTypes

Retrieves a list of service types used to convert the unmanaged QueryService method call, in which a service GUID is specified, into a managed IServiceProvider.GetService method call, in which a managed type is specified.

Methods

GetService(Guid)

Retrieves a service with a specified service GUID.

GetService(Type)

Retrieves a service of the specified type.

GetServiceImpl(Guid)

Provides the implementation for retrieving a service with a specific GUID.

GetServiceImpl(Type)

Provides the implementation for retrieving a service of a specific type.

Explicit Interface Implementations

IServiceProvider.QueryService(Guid, Guid, IntPtr)

Performs as a factory for services that are exposed through an implementation of IServiceProvider.

Extension Methods

QueryService(IServiceProvider, Guid)

Gets a service exposed by a service provider based on its service GUID.

QueryService<TService>(IServiceProvider)

Gets a service exposed by a service provider based on its service type.

Applies to