Share via


RegistrationService.IServiceProvider.GetService Method

Retrieves the service object of the specified type.

Namespace:  Microsoft.SqlServer.Management
Assembly:  Microsoft.SqlServer.Management.SDK.SqlStudio (in Microsoft.SqlServer.Management.SDK.SqlStudio.dll)

Syntax

'Declaration
Private Function GetService ( _
    serviceType As Type _
) As Object Implements IServiceProvider.GetService
'Usage
Dim instance As RegistrationService
Dim serviceType As Type
Dim returnValue As Object

returnValue = CType(instance, IServiceProvider).GetService(serviceType)
Object IServiceProvider.GetService(
    Type serviceType
)
private:
virtual Object^ GetService(
    Type^ serviceType
) sealed = IServiceProvider::GetService
private abstract GetService : 
        serviceType:Type -> Object 
private override GetService : 
        serviceType:Type -> Object 
JScript supports the use of explicit interface implementations, but not the declarations of new ones.

Parameters

  • serviceType
    Type: System.Type
    An object that specifies the type of service object to get.

Return Value

Type: System.Object
A service object of type serviceType.

Implements

IServiceProvider.GetService(Type)