ServiceDescriptor.KeyedSingleton Metode
Definisi
Penting
Beberapa informasi terkait produk prarilis yang dapat diubah secara signifikan sebelum dirilis. Microsoft tidak memberikan jaminan, tersirat maupun tersurat, sehubungan dengan informasi yang diberikan di sini.
Overload
KeyedSingleton(Type, Object, Func<IServiceProvider,Object,Object>) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton(Type, Object, Object) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton(Type, Object, Type) |
Membuat instans ServiceDescriptor dengan yang ditentukan |
KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton<TService,TImplementation>(Object) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton<TService>(Object, TService) |
Membuat instans ServiceDescriptor dengan , , |
KeyedSingleton(Type, Object, Func<IServiceProvider,Object,Object>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationFactory
dan Singleton masa pakai yang ditentukanserviceType
.
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ serviceType, System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, System::Object ^> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton (Type serviceType, object? serviceKey, Func<IServiceProvider,object?,object> implementationFactory);
static member KeyedSingleton : Type * obj * Func<IServiceProvider, obj, obj> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (serviceType As Type, serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, Object)) As ServiceDescriptor
Parameter
- serviceType
- Type
Jenis layanan.
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationFactory
- Func<IServiceProvider,Object,Object>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton(Type, Object, Object)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationInstance
dan Singleton masa pakai yang ditentukanserviceType
.
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ serviceType, System::Object ^ serviceKey, System::Object ^ implementationInstance);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton (Type serviceType, object? serviceKey, object implementationInstance);
static member KeyedSingleton : Type * obj * obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (serviceType As Type, serviceKey As Object, implementationInstance As Object) As ServiceDescriptor
Parameter
- serviceType
- Type
Jenis layanan.
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationInstance
- Object
Instans implementasi.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton(Type, Object, Type)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan yang ditentukan service
dan implementationType
dan masa pakainya Singleton .
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(Type ^ service, System::Object ^ serviceKey, Type ^ implementationType);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton (Type service, object? serviceKey, Type implementationType);
static member KeyedSingleton : Type * obj * Type -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function KeyedSingleton (service As Type, serviceKey As Object, implementationType As Type) As ServiceDescriptor
Parameter
- service
- Type
Jenis layanan.
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationType
- Type
Jenis implementasi.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton<TService,TImplementation>(Object, Func<IServiceProvider,Object,TImplementation>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , TImplementation
, implementationFactory
dan Singleton masa pakai yang ditentukanTService
.
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService,TImplementation> (object? serviceKey, Func<IServiceProvider,object?,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member KeyedSingleton : obj * Func<IServiceProvider, obj, #'Service> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class, TImplementation As Class) (serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, TImplementation)) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
- TImplementation
Jenis implementasi.
Parameter
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationFactory
- Func<IServiceProvider,Object,TImplementation>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton<TService,TImplementation>(Object)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , TImplementation
dan Singleton masa pakai yang ditentukanTService
.
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService,TImplementation> (object? serviceKey) where TService : class where TImplementation : class, TService;
static member KeyedSingleton : obj -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class, TImplementation As Class) (serviceKey As Object) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
- TImplementation
Jenis implementasi.
Parameter
- serviceKey
- Object
Dari ServiceKey layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton<TService>(Object, Func<IServiceProvider,Object,TService>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationFactory
dan Singleton masa pakai yang ditentukanTService
.
public:
generic <typename TService>
where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, Func<IServiceProvider ^, System::Object ^, TService> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService> (object? serviceKey, Func<IServiceProvider,object?,TService> implementationFactory) where TService : class;
static member KeyedSingleton : obj * Func<IServiceProvider, obj, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class) (serviceKey As Object, implementationFactory As Func(Of IServiceProvider, Object, TService)) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
Parameter
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationFactory
- Func<IServiceProvider,Object,TService>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
KeyedSingleton<TService>(Object, TService)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationInstance
dan Singleton masa pakai yang ditentukanTService
.
public:
generic <typename TService>
where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ KeyedSingleton(System::Object ^ serviceKey, TService implementationInstance);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor KeyedSingleton<TService> (object? serviceKey, TService implementationInstance) where TService : class;
static member KeyedSingleton : obj * 'Service -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function KeyedSingleton(Of TService As Class) (serviceKey As Object, implementationInstance As TService) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
Parameter
- serviceKey
- Object
Dari ServiceKey layanan.
- implementationInstance
- TService
Instans implementasi.
Mengembalikan
Instans baru .ServiceDescriptor