ServiceProviderServiceExtensions.GetServices ServiceProviderServiceExtensions.GetServices ServiceProviderServiceExtensions.GetServices Method

Definition

Overloads

GetServices(IServiceProvider, Type) GetServices(IServiceProvider, Type) GetServices(IServiceProvider, Type)

Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider) GetServices<T>(IServiceProvider) GetServices<T>(IServiceProvider)

Get an enumeration of services of type T from the IServiceProvider.

GetServices(IServiceProvider, Type) GetServices(IServiceProvider, Type) GetServices(IServiceProvider, Type)

Get an enumeration of services of type serviceType from the IServiceProvider.

public static System.Collections.Generic.IEnumerable<object> GetServices (this IServiceProvider provider, Type serviceType);
static member GetServices : IServiceProvider * Type -> seq<obj>
<Extension()>
Public Function GetServices (provider As IServiceProvider, serviceType As Type) As IEnumerable(Of Object)

Parameters

provider
IServiceProvider IServiceProvider IServiceProvider

The IServiceProvider to retrieve the services from.

serviceType
Type Type Type

An object that specifies the type of service object to get.

Returns

An enumeration of services of type serviceType.

GetServices<T>(IServiceProvider) GetServices<T>(IServiceProvider) GetServices<T>(IServiceProvider)

Get an enumeration of services of type T from the IServiceProvider.

public static System.Collections.Generic.IEnumerable<T> GetServices<T> (this IServiceProvider provider);
static member GetServices : IServiceProvider -> seq<'T>
<Extension()>
Public Function GetServices(Of T) (provider As IServiceProvider) As IEnumerable(Of T)

Type Parameters

T

The type of service object to get.

Parameters

provider
IServiceProvider IServiceProvider IServiceProvider

The IServiceProvider to retrieve the services from.

Returns

An enumeration of services of type T.

Applies to