|
DotNetDupe 4.0.6
C++17/20 Implementation of the .NET Base Class Library (BCL)
|
Classes | |
| class | IServiceCollection |
| Specifies the contract for a collection of service descriptors. More... | |
| class | IServiceScope |
| Controls the lifetime of a scoped service. More... | |
| class | IServiceScopeFactory |
| Defines a factory interface used to create instances of IServiceScope. More... | |
| class | ServiceCollection |
| Default implementation of the IServiceCollection interface. More... | |
| class | ServiceDescriptor |
| Describes a service with its service type, implementation, and lifetime. More... | |
| class | ServiceProvider |
| Default IoC service provider for resolving dependencies. More... | |
| class | ServiceScope |
| Concrete implementation of IServiceScope for managing scoped lifetimes. More... | |
| class | ServiceScopeFactory |
| Concrete implementation of IServiceScopeFactory. More... | |
Enumerations | |
| enum class | ServiceLifetime { Singleton , Scoped , Transient } |
| Specifies the lifetime of a service in an IServiceCollection. More... | |
Functions | |
| static DotNetDupe::System::SmartPointer< DotNetDupe::System::Object > | InstantiateService (ServiceProvider *pSelf, const ServiceDescriptor &descriptor) |
|
strong |
Specifies the lifetime of a service in an IServiceCollection.
Modeled after Microsoft.Extensions.DependencyInjection.ServiceLifetime. Defines whether a registered service is created once globally (Singleton), once per child resolution scope (Scoped), or anew upon every request (Transient). [Microsoft.Extensions.DependencyInjection]
Definition at line 11 of file ServiceLifetime.h.
|
static |
Guard: Return pre-instantiated singleton instance if available.
Invoke factory delegate with a scoped proxy if registered.
Return null if service cannot be instantiated.
Definition at line 30 of file ServiceProvider.cpp.
References DotNetDupe::Extensions::DependencyInjection::ServiceDescriptor::GetFactory(), DotNetDupe::Extensions::DependencyInjection::ServiceDescriptor::GetInstance(), InstantiateService(), and DotNetDupe::System::SmartPointer< T >::NewShared().
Referenced by InstantiateService().