ServiceProviderWithSite Class
Provides an object that proffers services using both the managed and unmanaged versions of the ServiceProvider interface, and can be sited using the IObjectWithSite interface.
Inheritance Hierarchy
System.Object
Microsoft.VisualStudio.Data.ServiceProvider
Microsoft.VisualStudio.Data.ServiceProviderWithSite
Microsoft.VisualStudio.Data.DataConnectionSupport
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Déclaration
Public MustInherit Class ServiceProviderWithSite _
Inherits ServiceProvider _
Implements IObjectWithSite
public abstract class ServiceProviderWithSite : ServiceProvider,
IObjectWithSite
public ref class ServiceProviderWithSite abstract : public ServiceProvider,
IObjectWithSite
[<AbstractClass>]
type ServiceProviderWithSite =
class
inherit ServiceProvider
interface IObjectWithSite
end
public abstract class ServiceProviderWithSite extends ServiceProvider implements IObjectWithSite
The ServiceProviderWithSite type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ServiceProviderWithSite | Class constructor. Instantiates a new instance of the ServiceProviderWithSite class. |
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. (Inherited from ServiceProvider.) | |
Site | Retrieves or sets the site object instance. |
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 a hash function for a particular type. (Inherited from Object.) | |
GetService(Guid) | Retrieves a service with a specified service GUID. (Inherited from ServiceProvider.) | |
GetService(Type) | Retrieves a service of the specified type. (Inherited from ServiceProvider.) | |
GetServiceImpl(Guid) | Provides the implementation for retrieving a service with a specific GUID. (Inherited from ServiceProvider.) | |
GetServiceImpl(Type) | Provides the implementation for retrieving a service of a specific type. (Inherited from ServiceProvider.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
OnSiteChanged | Raises the SiteChanged event. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Top
Events
Name | Description | |
---|---|---|
SiteChanged | Event raised when the Site property has changed. |
Top
Explicit Interface Implementations
Name | Description | |
---|---|---|
IObjectWithSite.GetSite | Retrieves the last site set using the IObjectWithSite.SetSite method. If there is no known site, an exception is thrown. | |
IServiceProvider.QueryService | Performs as a factory for services that are exposed through an implementation of IServiceProvider. (Inherited from ServiceProvider.) | |
IObjectWithSite.SetSite | Provides a site's IUnknown pointer to a given object. |
Top
Remarks
This object essentially provides multiple inheritance from both the ServiceProvider and the ObjectWithSite classes. It actually inherits from the ServiceProvider class and has an IObjectWithSite object as a member variable, to which it delegates the implementation of IObjectWithSite.
This class is useful as a base class for any class that needs to be a service provider that is also able to be sited.
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.