< Summary

Information
Class: Elsa.Workflows.Management.ShellFeatures.CachingWorkflowDefinitionsFeature
Assembly: Elsa.Workflows.Management
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/ShellFeatures/CachingWorkflowDefinitionsFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 5
Coverable lines: 5
Total lines: 28
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
ConfigureServices(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Management/ShellFeatures/CachingWorkflowDefinitionsFeature.cs

#LineLine coverage
 1using CShells.Features;
 2using Elsa.Workflows.Management.Handlers.Notifications;
 3using Elsa.Workflows.Management.Services;
 4using Elsa.Workflows.Management.Stores;
 5using JetBrains.Annotations;
 6using Microsoft.Extensions.DependencyInjection;
 7
 8namespace Elsa.Workflows.Management.ShellFeatures;
 9
 10/// <summary>
 11/// Configures workflow definition caching.
 12/// </summary>
 13[ShellFeature(
 14    DisplayName = "Caching Workflow Definitions",
 15    Description = "Provides caching for workflow definitions")]
 16[UsedImplicitly]
 17public class CachingWorkflowDefinitionsFeature : IShellFeature
 18{
 19    public void ConfigureServices(IServiceCollection services)
 20    {
 021        services.AddSingleton<IWorkflowDefinitionCacheManager, WorkflowDefinitionCacheManager>();
 022        services.Decorate<IWorkflowDefinitionStore, CachingWorkflowDefinitionStore>();
 023        services.Decorate<IWorkflowDefinitionService, CachingWorkflowDefinitionService>();
 024        services.AddNotificationHandler<EvictWorkflowDefinitionServiceCache>();
 025    }
 26}
 27
 28