ServiceDescriptor.Scoped 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
Scoped(Type, Func<IServiceProvider,Object>) |
Membuat instans ServiceDescriptor dengan , , |
Scoped(Type, Type) |
Membuat instans ServiceDescriptor dengan yang ditentukan |
Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>) |
Membuat instans ServiceDescriptor dengan , , |
Scoped<TService,TImplementation>() |
Membuat instans ServiceDescriptor dengan , , |
Scoped<TService>(Func<IServiceProvider,TService>) |
Membuat instans ServiceDescriptor dengan , , |
Scoped(Type, Func<IServiceProvider,Object>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationFactory
dan Scoped masa pakai yang ditentukanservice
.
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Type ^ service, Func<IServiceProvider ^, System::Object ^> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped (Type service, Func<IServiceProvider,object> implementationFactory);
static member Scoped : Type * Func<IServiceProvider, obj> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function Scoped (service As Type, implementationFactory As Func(Of IServiceProvider, Object)) As ServiceDescriptor
Parameter
- service
- Type
Jenis layanan.
- implementationFactory
- Func<IServiceProvider,Object>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
Scoped(Type, Type)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan yang ditentukan service
dan implementationType
dan masa pakainya Scoped .
public:
static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Type ^ service, Type ^ implementationType);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped (Type service, Type implementationType);
static member Scoped : Type * Type -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor
Public Shared Function Scoped (service As Type, implementationType As Type) As ServiceDescriptor
Parameter
- service
- Type
Jenis layanan.
- implementationType
- Type
Jenis implementasinya.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
Scoped<TService,TImplementation>(Func<IServiceProvider,TImplementation>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , TImplementation
, implementationFactory
dan Scoped masa pakai yang ditentukanTService
.
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Func<IServiceProvider ^, TImplementation> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService,TImplementation> (Func<IServiceProvider,TImplementation> implementationFactory) where TService : class where TImplementation : class, TService;
static member Scoped : Func<IServiceProvider, #'Service> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class, TImplementation As Class) (implementationFactory As Func(Of IServiceProvider, TImplementation)) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
- TImplementation
Jenis implementasinya.
Parameter
- implementationFactory
- Func<IServiceProvider,TImplementation>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
Scoped<TService,TImplementation>()
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , TImplementation
dan Scoped masa pakai yang ditentukanTService
.
public:
generic <typename TService, typename TImplementation>
where TService : class where TImplementation : class, TService static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped();
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService,TImplementation> () where TService : class where TImplementation : class, TService;
static member Scoped : unit -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class, TImplementation As Class) () As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
- TImplementation
Jenis implementasinya.
Mengembalikan
Instans baru .ServiceDescriptor
Berlaku untuk
Scoped<TService>(Func<IServiceProvider,TService>)
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
- Sumber:
- ServiceDescriptor.cs
Membuat instans ServiceDescriptor dengan , , implementationFactory
dan Scoped masa pakai yang ditentukanTService
.
public:
generic <typename TService>
where TService : class static Microsoft::Extensions::DependencyInjection::ServiceDescriptor ^ Scoped(Func<IServiceProvider ^, TService> ^ implementationFactory);
public static Microsoft.Extensions.DependencyInjection.ServiceDescriptor Scoped<TService> (Func<IServiceProvider,TService> implementationFactory) where TService : class;
static member Scoped : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.Extensions.DependencyInjection.ServiceDescriptor (requires 'Service : null)
Public Shared Function Scoped(Of TService As Class) (implementationFactory As Func(Of IServiceProvider, TService)) As ServiceDescriptor
Jenis parameter
- TService
Jenis layanan.
Parameter
- implementationFactory
- Func<IServiceProvider,TService>
Pabrik untuk membuat instans baru implementasi layanan.
Mengembalikan
Instans baru .ServiceDescriptor