< Summary

Information
Class: Elsa.Persistence.EFCore.Modules.Runtime.EFCoreWorkflowRuntimePersistenceFeature
Assembly: Elsa.Persistence.EFCore
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Runtime/WorkflowRuntimePersistenceFeature.cs
Line coverage
100%
Covered lines: 22
Uncovered lines: 0
Coverable lines: 22
Total lines: 45
Line coverage: 100%
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%
Configure()100%11100%
Apply()100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore/Modules/Runtime/WorkflowRuntimePersistenceFeature.cs

#LineLine coverage
 1using Elsa.Features.Attributes;
 2using Elsa.Features.Services;
 3using Elsa.KeyValues.Entities;
 4using Elsa.KeyValues.Features;
 5using Elsa.Workflows.Runtime.Entities;
 6using Elsa.Workflows.Runtime.Features;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Persistence.EFCore.Modules.Runtime;
 10
 11/// <summary>
 12/// Configures the default workflow runtime to use EF Core persistence providers.
 13/// </summary>
 14[DependsOn(typeof(WorkflowRuntimeFeature))]
 715public class EFCoreWorkflowRuntimePersistenceFeature(IModule module) : PersistenceFeatureBase<EFCoreWorkflowRuntimePersi
 16{
 17    /// <inheritdoc />
 18    public override void Configure()
 19    {
 720        Module.Configure<KeyValueFeature>(feature =>
 721        {
 722            feature.KeyValueStore = sp => sp.GetRequiredService<EFCoreKeyValueStore>();
 1423        });
 724        Module.Configure<WorkflowRuntimeFeature>(feature =>
 725        {
 44926            feature.TriggerStore = sp => sp.GetRequiredService<EFCoreTriggerStore>();
 49127            feature.BookmarkStore = sp => sp.GetRequiredService<EFCoreBookmarkStore>();
 48528            feature.BookmarkQueueStore = sp => sp.GetRequiredService<EFBookmarkQueueStore>();
 43829            feature.WorkflowExecutionLogStore = sp => sp.GetRequiredService<EFCoreWorkflowExecutionLogStore>();
 44130            feature.ActivityExecutionLogStore = sp => sp.GetRequiredService<EFCoreActivityExecutionStore>();
 1431        });
 732    }
 33
 34    /// <inheritdoc />
 35    public override void Apply()
 36    {
 737        base.Apply();
 738        AddEntityStore<StoredTrigger, EFCoreTriggerStore>();
 739        AddStore<StoredBookmark, EFCoreBookmarkStore>();
 740        AddStore<BookmarkQueueItem, EFBookmarkQueueStore>();
 741        AddEntityStore<WorkflowExecutionLogRecord, EFCoreWorkflowExecutionLogStore>();
 742        AddEntityStore<ActivityExecutionRecord, EFCoreActivityExecutionStore>();
 743        AddStore<SerializedKeyValuePair, EFCoreKeyValueStore>();
 744    }
 45}