Bewerken

Delen via


ServiceManager.GetService Method

Definition

Overloads

GetService(Type)

Retrieves the requested service. This method returns null if the service could not be located.

GetService<TServiceType>()

Retrieves the requested service. This method returns null if the service could not be located.

GetService(Type)

Retrieves the requested service. This method returns null if the service could not be located.

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

Parameters

serviceType
Type

The type of service to retrieve.

Returns

Returns Object, which is an instance of the service, or null if the service has not been published.

Implements

Exceptions

serviceType is null.

Applies to

GetService<TServiceType>()

Retrieves the requested service. This method returns null if the service could not be located.

public:
generic <typename TServiceType>
 TServiceType GetService();
public TServiceType GetService<TServiceType> ();
member this.GetService : unit -> 'ServiceType
Public Function GetService(Of TServiceType) () As TServiceType

Type Parameters

TServiceType

The type of service to retrieve.

Returns

TServiceType

A generic type, which is an instance of the service, or null if the service has not been published.

Applies to