ServiceProviderServiceExtensions.GetServices Metoda

Definice

Přetížení

GetServices(IServiceProvider, Type)

Získat výčet služeb typu serviceType z IServiceProvider .Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

Získat výčet služeb typu T z IServiceProvider .Get an enumeration of services of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

Získat výčet služeb typu serviceType z IServiceProvider .Get an enumeration of services of type serviceType from the IServiceProvider.

public:
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<System::Object ^> ^ GetServices(IServiceProvider ^ provider, Type ^ serviceType);
public static System.Collections.Generic.IEnumerable<object> GetServices (this IServiceProvider provider, Type serviceType);
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)

Parametry

provider
IServiceProvider

IServiceProviderK načtení služeb z.The IServiceProvider to retrieve the services from.

serviceType
Type

Objekt, který určuje typ objektu služby, který se má získat.An object that specifies the type of service object to get.

Návraty

IEnumerable<Object>

Výčet služeb typu serviceType .An enumeration of services of type serviceType.

Platí pro

GetServices<T>(IServiceProvider)

Získat výčet služeb typu T z IServiceProvider .Get an enumeration of services of type T from the IServiceProvider.

public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
 static System::Collections::Generic::IEnumerable<T> ^ GetServices(IServiceProvider ^ provider);
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)

Parametry typu

T

Typ objektu služby, který se má získatThe type of service object to get.

Parametry

provider
IServiceProvider

IServiceProviderK načtení služeb z.The IServiceProvider to retrieve the services from.

Návraty

IEnumerable<T>

Výčet služeb typu T .An enumeration of services of type T.

Platí pro