ServiceProvider Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents a dynamic, interoperable service provider.
public ref class ServiceProvider : IServiceProvider, Microsoft::VisualStudio::OLE::Interop::IServiceProvider, System::ComponentModel::Design::IServiceContainer
[System.Runtime.InteropServices.ComVisible(true)]
public class ServiceProvider : IServiceProvider, Microsoft.VisualStudio.OLE.Interop.IServiceProvider, System.ComponentModel.Design.IServiceContainer
[<System.Runtime.InteropServices.ComVisible(true)>]
type ServiceProvider = class
interface IServiceContainer
interface IServiceProvider
interface IServiceProvider
Public Class ServiceProvider
Implements IServiceContainer, IServiceProvider, IServiceProvider
- Inheritance
-
ServiceProvider
- Derived
- Attributes
- Implements
Constructors
ServiceProvider() |
Constructor for a new service provider. |
ServiceProvider(IServiceProvider) |
Constructor for a service provider that wraps and/or extends an existing OLE service provider. |
ServiceProvider(IServiceProvider) |
Constructor for a service provider that wraps and/or extends an existing managed service provider. |
Properties
ParentProvider |
Gets the current instance of the parent service provider. |
Methods
AddService(Type, Object, Boolean) |
Adds the specified service to the collection of service objects or to the parent service container. |
AddService(Type, Object) |
Adds the specified service to the internal collection of services. |
AddService(Type, ServiceCreatorCallback, Boolean) |
Adds the specified service to the internal collection of services or to the parent service container. |
AddService(Type, ServiceCreatorCallback) |
Adds the specified service to the internal collection of services. |
GetService(Guid) |
Retrieves a service with a specified service GUID. |
GetService(Type) |
Retrieves a service of the specified type. |
RemoveService(Type, Boolean) |
Removes the specified service from the internal services collection or from the parent service container. |
RemoveService(Type) |
Removes the specified service from the internal services collection |
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. |