Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
Gets the requested service.
Namespace: Microsoft.VisualStudio.Shell.Design
Assembly: Microsoft.VisualStudio.Shell.Design (in Microsoft.VisualStudio.Shell.Design.dll)
Syntax
'Declaration
Protected Function GetService ( _
serviceType As Type _
) As Object
protected Object GetService(
Type serviceType
)
protected:
Object^ GetService(
Type^ serviceType
)
member GetService :
serviceType:Type -> Object
protected function GetService(
serviceType : Type
) : Object
Parameters
serviceType
Type: System.TypeThe Type of service to retrieve
Return Value
Type: System.Object
An Object that represents an instance of the requested service; otherwise, nulla null reference (Nothing in Visual Basic) if no such service exists.
Exceptions
| Exception | Condition |
|---|---|
| ArgumentNullException | serviceType is nulla null reference (Nothing in Visual Basic). |
Remarks
The default implementation of the GetService method delegates the request to the IServiceProvider that is set by the SetSite method.
.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.