< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Management.WorkflowManagementPersistenceFeature
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowManagementPersistenceFeature.cs
Line coverage
50%
Covered lines: 8
Uncovered lines: 8
Coverable lines: 16
Total lines: 49
Line coverage: 50%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%11100%
get_DbContextOptionsBuilder()100%11100%
set_DbContextOptionsBuilder(...)100%11100%
get_UseContextPooling()100%11100%
set_UseContextPooling(...)100%210%
get_RunMigrations()100%11100%
set_RunMigrations(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Management/WorkflowManagementPersistenceFeature.cs

#LineLine coverage
 1using Elsa.Features.Attributes;
 2using Elsa.Features.Services;
 3using Elsa.Workflows.Management.Features;
 4using JetBrains.Annotations;
 5using Microsoft.EntityFrameworkCore;
 6
 7namespace Elsa.Persistence.EFCore.Modules.Management;
 8
 9/// <summary>
 10/// Configures the <see cref="WorkflowInstancesFeature"/> and <see cref="WorkflowDefinitionsFeature"/> features with an 
 11/// </summary>
 12[DependsOn(typeof(EFCoreWorkflowInstancePersistenceFeature))]
 13[DependsOn(typeof(EFCoreWorkflowDefinitionPersistenceFeature))]
 14[PublicAPI]
 115public class WorkflowManagementPersistenceFeature(IModule module) : PersistenceFeatureBase<WorkflowManagementPersistence
 16{
 17    public override Action<IServiceProvider, DbContextOptionsBuilder> DbContextOptionsBuilder
 18    {
 32619        get => base.DbContextOptionsBuilder;
 20        set
 21        {
 222            base.DbContextOptionsBuilder = value;
 423            Module.Configure<EFCoreWorkflowDefinitionPersistenceFeature>(x => x.DbContextOptionsBuilder = value);
 424            Module.Configure<EFCoreWorkflowInstancePersistenceFeature>(x => x.DbContextOptionsBuilder = value);
 225        }
 26    }
 27
 28    public override bool UseContextPooling
 29    {
 130        get => base.UseContextPooling;
 31        set
 32        {
 033            base.UseContextPooling = value;
 034            Module.Configure<EFCoreWorkflowDefinitionPersistenceFeature>(x => x.UseContextPooling = value);
 035            Module.Configure<EFCoreWorkflowInstancePersistenceFeature>(x => x.UseContextPooling = value);
 036        }
 37    }
 38
 39    public override bool RunMigrations
 40    {
 141        get => base.RunMigrations;
 42        set
 43        {
 044            base.RunMigrations = value;
 045            Module.Configure<EFCoreWorkflowDefinitionPersistenceFeature>(x => x.RunMigrations = value);
 046            Module.Configure<EFCoreWorkflowInstancePersistenceFeature>(x => x.RunMigrations = value);
 047        }
 48    }
 49}