次の方法で共有


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

Name Description
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

Name Description
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

Name Description
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

Name Description
IServiceProvider.QueryService(Guid, Guid, IntPtr)

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

Extension Methods

Name Description
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