TryGetServiceAsync<TService> Method

Returns a service-provider that implements the interface specified by <typeparamref name="TService" />.

Syntax

public abstract Task<TService> TryGetServiceAsync<TService>()

Returns

Implementer of <typeparamref name="TService" /> if supported; otherwise null (Nothing in Visual Basic).