Update persistence feature base classes to include self-type
Refactored multiple persistence feature classes to implement the self-referencing generic type parameter in the `PersistenceFeatureBase` class. This ensures that each feature correctly references its own type, enhancing type safety and overall code maintainability.
This commit is contained in:
parent
d7c11db280
commit
58e4523406
|
|
@ -13,7 +13,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Alterations;
|
|||
/// Configures the default workflow runtime to use EF Core persistence providers.
|
||||
/// </summary>
|
||||
[DependsOn(typeof(AlterationsFeature))]
|
||||
public class EFCoreAlterationsPersistenceFeature(IModule module) : PersistenceFeatureBase<AlterationsElsaDbContext>(module)
|
||||
public class EFCoreAlterationsPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreAlterationsPersistenceFeature, AlterationsElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<AlterationsElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Identity;
|
|||
/// </summary>
|
||||
[DependsOn(typeof(IdentityFeature))]
|
||||
[PublicAPI]
|
||||
public class EFCoreIdentityPersistenceFeature(IModule module) : PersistenceFeatureBase<IdentityElsaDbContext>(module)
|
||||
public class EFCoreIdentityPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreIdentityPersistenceFeature, IdentityElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<IdentityElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Labels;
|
|||
/// Configures the <see cref="LabelsFeature"/> feature with an Entity Framework Core persistence provider.
|
||||
/// </summary>
|
||||
[DependsOn(typeof(LabelsFeature))]
|
||||
public class EFCoreLabelPersistenceFeature(IModule module) : PersistenceFeatureBase<LabelsElsaDbContext>(module)
|
||||
public class EFCoreLabelPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreLabelPersistenceFeature, LabelsElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<LabelsElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Management;
|
|||
/// Configures the <see cref="WorkflowDefinitionsFeature"/> feature with an Entity Framework Core persistence provider.
|
||||
/// </summary>
|
||||
[DependsOn(typeof(WorkflowManagementFeature))]
|
||||
public class EFCoreWorkflowDefinitionPersistenceFeature(IModule module) : PersistenceFeatureBase<ManagementElsaDbContext>(module)
|
||||
public class EFCoreWorkflowDefinitionPersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowDefinitionPersistenceFeature, ManagementElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<ManagementElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Management;
|
|||
/// Configures the <see cref="WorkflowInstancesFeature"/> feature with an Entity Framework Core persistence provider.
|
||||
/// </summary>
|
||||
[DependsOn(typeof(WorkflowManagementFeature))]
|
||||
public class EFCoreWorkflowInstancePersistenceFeature(IModule module) : PersistenceFeatureBase<ManagementElsaDbContext>(module)
|
||||
public class EFCoreWorkflowInstancePersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowInstancePersistenceFeature, ManagementElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<ManagementElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Management;
|
|||
[DependsOn(typeof(WorkflowInstancesFeature))]
|
||||
[DependsOn(typeof(WorkflowDefinitionsFeature))]
|
||||
[PublicAPI]
|
||||
public class WorkflowManagementPersistenceFeature(IModule module) : PersistenceFeatureBase<ManagementElsaDbContext>(module)
|
||||
public class WorkflowManagementPersistenceFeature(IModule module) : PersistenceFeatureBase<WorkflowManagementPersistenceFeature, ManagementElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<ManagementElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ namespace Elsa.EntityFrameworkCore.Modules.Runtime;
|
|||
/// Configures the default workflow runtime to use EF Core persistence providers.
|
||||
/// </summary>
|
||||
[DependsOn(typeof(WorkflowRuntimeFeature))]
|
||||
public class EFCoreWorkflowRuntimePersistenceFeature(IModule module) : PersistenceFeatureBase<RuntimeElsaDbContext>(module)
|
||||
public class EFCoreWorkflowRuntimePersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowRuntimePersistenceFeature, RuntimeElsaDbContext>(module)
|
||||
{
|
||||
/// Delegate for determining the exception handler.
|
||||
public Func<IServiceProvider, IDbExceptionHandler<RuntimeElsaDbContext>> DbExceptionHandler { get; set; } = _ => new NoopDbExceptionHandler();
|
||||
|
|
|
|||
Loading…
Reference in a new issue