ServiceProviderKeyedServiceExtensions.GetKeyedServices Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
GetKeyedServices(IServiceProvider, Type, Object) |
Gets an enumeration of services of type |
GetKeyedServices<T>(IServiceProvider, Object) |
Gets an enumeration of services of type |
GetKeyedServices(IServiceProvider, Type, Object)
Gets an enumeration of services of type serviceType
from the IServiceProvider.
public:
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<System::Object ^> ^ GetKeyedServices(IServiceProvider ^ provider, Type ^ serviceType, System::Object ^ serviceKey);
public static System.Collections.Generic.IEnumerable<object?> GetKeyedServices (this IServiceProvider provider, Type serviceType, object? serviceKey);
static member GetKeyedServices : IServiceProvider * Type * obj -> seq<obj>
<Extension()>
Public Function GetKeyedServices (provider As IServiceProvider, serviceType As Type, serviceKey As Object) As IEnumerable(Of Object)
Parameters
- provider
- IServiceProvider
The IServiceProvider to retrieve the services from.
- serviceType
- Type
An object that specifies the type of service object to get.
- serviceKey
- Object
An object that specifies the key of service object to get.
Returns
An enumeration of services of type serviceType
.
Applies to
GetKeyedServices<T>(IServiceProvider, Object)
Gets an enumeration of services of type T
from the IServiceProvider.
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Generic::IEnumerable<T> ^ GetKeyedServices(IServiceProvider ^ provider, System::Object ^ serviceKey);
public static System.Collections.Generic.IEnumerable<T> GetKeyedServices<T> (this IServiceProvider provider, object? serviceKey);
static member GetKeyedServices : IServiceProvider * obj -> seq<'T>
<Extension()>
Public Function GetKeyedServices(Of T) (provider As IServiceProvider, serviceKey As Object) As IEnumerable(Of T)
Type Parameters
- T
The type of service object to get.
Parameters
- provider
- IServiceProvider
The IServiceProvider to retrieve the services from.
- serviceKey
- Object
An object that specifies the key of service object to get.
Returns
An enumeration of services of type T
.
Applies to
Σχόλια
https://aka.ms/ContentUserFeedback.
Σύντομα διαθέσιμα: Καθ' όλη τη διάρκεια του 2024 θα καταργήσουμε σταδιακά τα ζητήματα GitHub ως μηχανισμό ανάδρασης για το περιεχόμενο και θα το αντικαταστήσουμε με ένα νέο σύστημα ανάδρασης. Για περισσότερες πληροφορίες, ανατρέξτε στο θέμα:Υποβολή και προβολή σχολίων για