ServiceProviderServiceExtensions.GetServices Metoda

Definicja

Przeciążenia

GetServices(IServiceProvider, Type)

Pobierz Wyliczenie usług typu serviceType z IServiceProvider.Get an enumeration of services of type serviceType from the IServiceProvider.

GetServices<T>(IServiceProvider)

Pobierz Wyliczenie usług typu T z IServiceProvider.Get an enumeration of services of type T from the IServiceProvider.

GetServices(IServiceProvider, Type)

Pobierz Wyliczenie usług 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);
static member GetServices : IServiceProvider * Type -> seq<obj>
<Extension()>
Public Function GetServices (provider As IServiceProvider, serviceType As Type) As IEnumerable(Of Object)

Parametry

provider
IServiceProvider

IServiceProvider, z którego mają zostać pobrane usługi.The IServiceProvider to retrieve the services from.

serviceType
Type

Obiekt, który określa typ obiektu usługi do pobrania.An object that specifies the type of service object to get.

Zwraca

Wyliczenie usług typu serviceType.An enumeration of services of type serviceType.

GetServices<T>(IServiceProvider)

Pobierz Wyliczenie usług 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 obiektu usługi do pobrania.The type of service object to get.

Parametry

provider
IServiceProvider

IServiceProvider, z którego mają zostać pobrane usługi.The IServiceProvider to retrieve the services from.

Zwraca

Wyliczenie usług typu T.An enumeration of services of type T.

Dotyczy