Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Gets a "service" from the default composition container, i.e. an object of which there can only a single instance exist in a given composition container.
Namespace: Microsoft.VisualStudio.ComponentModelHost
Assembly: Microsoft.VisualStudio.ComponentModelHost (in Microsoft.VisualStudio.ComponentModelHost.dll)
Syntax
'Declaration
Function GetService(Of T As Class) As T
'Usage
Dim instance As IComponentModel
Dim returnValue As T
returnValue = instance.GetService()
T GetService<T>()
where T : class
generic<typename T>
where T : ref class
T GetService()
abstract GetService : unit -> 'T when 'T : not struct
JScript does not support generic types or methods.
Type Parameters
- T
The type of service.
Return Value
Type: T
Remarks
Calling this method is the same as calling GetExportedValue.
.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.