ServiceProvider Class
Provides an object that can proffer services using both the managed and unmanaged IServiceProvider interfaces.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.ServiceProvider
Microsoft.VisualStudio.Data.DataConnection
Microsoft.VisualStudio.Data.ServiceProviderWithSite
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaration
<ComVisibleAttribute(True)> _
Public Class ServiceProvider _
Implements IServiceProvider, IServiceProvider
[ComVisibleAttribute(true)]
public class ServiceProvider : IServiceProvider,
IServiceProvider
[ComVisibleAttribute(true)]
public ref class ServiceProvider : IServiceProvider,
IServiceProvider
[<ComVisibleAttribute(true)>]
type ServiceProvider =
class
interface IServiceProvider
interface IServiceProvider
end
public class ServiceProvider implements IServiceProvider, IServiceProvider
The ServiceProvider type exposes the following members.
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. |
Top
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. |
Top
Methods
Name | Description | |
---|---|---|
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
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. | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IServiceProvider.QueryService | Performs as a factory for services that are exposed through an implementation of IServiceProvider. |
Top
Remarks
Note
In the syntax block above, the class inheritance derives from both the managed and the unmanaged IServiceProvider interfaces. That is, the first (unmanaged) is IServiceProvider interface and the second (managed) is IServiceProvider.
This class serves two purposes. First, it provides a managed wrapper around the unmanaged IServiceProvider interface. Second, it provides a managed base class for implementing the unmanaged IServiceProvider interface.
For both cases, the managed IServiceProvider interface is also implemented, so managed clients of the object can communicate with the object using managed-friendly code.
Thread Safety
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.