Share via


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

'Declaration
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

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

See Also

Reference

ServiceProvider Class

GetService Overload

Microsoft.VisualStudio.Data.Framework Namespace