ServiceProvider.GetService Method (Guid)
Retrieves a service with a specified service GUID.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
'Declaración
Public Overridable Function GetService ( _
serviceGuid As Guid _
) As Object
public virtual Object GetService(
Guid serviceGuid
)
public:
virtual Object^ GetService(
Guid serviceGuid
)
abstract GetService :
serviceGuid:Guid -> Object
override GetService :
serviceGuid:Guid -> Object
public function GetService(
serviceGuid : Guid
) : Object
Parameters
- serviceGuid
Type: System.Guid
The GUID of a service.
Return Value
Type: System.Object
The service with the specified service GUID, or nulla null reference (Nothing in Visual Basic) if no service is found.
Remarks
This method uses the information specified by the Services property to map the GUID into a Type value, and then tries to get the service through a call to GetService. If this method is not able to obtain the service, and the parent implements the unmanaged IServiceProvider to which the specified service GUID can be passed, it queries the parent service.
.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.