< Summary

Information
Class: Elsa.Persistence.EFCore.SqlServer.ShellFeatures.Runtime.SqlServerWorkflowRuntimePersistenceShellFeature
Assembly: Elsa.Persistence.EFCore.SqlServer
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Runtime/SqlServerWorkflowRuntimePersistenceShellFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 40
Line coverage: 0%
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
ConfigureProvider(...)100%210%
OnConfiguring(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Persistence.EFCore.SqlServer/ShellFeatures/Runtime/SqlServerWorkflowRuntimePersistenceShellFeature.cs

#LineLine coverage
 1using System.Reflection;
 2using CShells.Features;
 3using Elsa.Persistence.EFCore.Extensions;
 4using Elsa.Persistence.EFCore.Modules.Runtime;
 5using Elsa.Workflows.Runtime;
 6using Elsa.Workflows.Runtime.ShellFeatures;
 7using Elsa.Platform.PackageManifest.Generator.Hints;
 8using JetBrains.Annotations;
 9using Microsoft.EntityFrameworkCore;
 10using Microsoft.Extensions.DependencyInjection;
 11
 12namespace Elsa.Persistence.EFCore.SqlServer.ShellFeatures.Runtime;
 13
 14/// <summary>
 15/// Configures the runtime feature to use SqlServer persistence.
 16/// </summary>
 17[ManifestFeatureCategory("Persistence")]
 18[ManifestFeatureCategory("Workflows")]
 19[ShellFeature(
 20    DisplayName = "SqlServer Workflow Runtime Persistence",
 21    Description = "Provides SqlServer persistence for workflow runtime",
 22    DependsOn = [typeof(WorkflowRuntimeFeature)])]
 23[UsedImplicitly]
 24[ManifestInfrastructure("sqlserver-database", "database", Reason = "Stores workflow runtime data in SQL Server.", Provid
 25public class SqlServerWorkflowRuntimePersistenceShellFeature
 26    : EFCoreWorkflowRuntimePersistenceShellFeatureBase
 27{
 28    /// <inheritdoc />
 29    protected override void ConfigureProvider(DbContextOptionsBuilder builder, Assembly migrationsAssembly, string conne
 30    {
 031        builder.UseElsaSqlServer(migrationsAssembly, connectionString, options);
 032    }
 33
 34    /// <inheritdoc />
 35    protected override void OnConfiguring(IServiceCollection services)
 36    {
 037        base.OnConfiguring(services);
 038        services.AddScoped<IWorkflowCommitTransaction, EFCoreWorkflowCommitTransaction>();
 039    }
 40}