Share via


ServiceProvider.GetService Method

Definition

Overloads

GetService(Guid)

Retrieves a service with a specified service GUID.

GetService(Type)

Retrieves a service of the specified type.

GetService(Guid)

Retrieves a service with a specified service GUID.

public:
 System::Object ^ GetService(Guid serviceGuid);
public object GetService (Guid serviceGuid);
member this.GetService : Guid -> obj
Public Function GetService (serviceGuid As Guid) As Object

Parameters

serviceGuid
Guid

The GUID of a service.

Returns

Returns the service with the specified service GUID, or returns null if no service was found.

Applies to

GetService(Type)

Retrieves a service of the specified type.

public:
 virtual System::Object ^ GetService(Type ^ serviceType);
public object GetService (Type serviceType);
abstract member GetService : Type -> obj
override this.GetService : Type -> obj
Public Function GetService (serviceType As Type) As Object

Parameters

serviceType
Type

A service type.

Returns

Returns the service of the specified type, or returns null if no service was found.

Implements

Applies to