ServiceProvider.ServiceTypes Property
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.
Namespace: Microsoft.VisualStudio.Data
Assembly: Microsoft.VisualStudio.Data (in Microsoft.VisualStudio.Data.dll)
Syntax
'Declaración
Protected ReadOnly Property ServiceTypes As IList(Of Type)
Get
protected IList<Type> ServiceTypes { get; }
protected:
property IList<Type^>^ ServiceTypes {
IList<Type^>^ get ();
}
member ServiceTypes : IList<Type>
function get ServiceTypes () : IList<Type>
Property Value
Type: System.Collections.Generic.IList<Type>
A list of service types used to convert the unmanaged QueryService method call, in which a service GUID is specified, into a managed GetService method call, in which a managed type is specified.
Remarks
When exposing a managed IServiceProvider object to unmanaged code as the unmanaged IServiceProvider interface, a problem arises in that the unmanaged code will request a service using a service GUID. The managed implementation cannot delegate to the GetService method without first converting this into the managed type. A list of possible service types must be provided so it can search this list for types with a GUID equal to the service GUID.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.