< 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: 31
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 Elsa.Platform.PackageManifest.Generator.Hints;
 6using JetBrains.Annotations;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.Workflows.Management.ShellFeatures;
 10
 11/// <summary>
 12/// Configures workflow definition caching.
 13/// </summary>
 14[ManifestFeatureCategory("Workflows")]
 15[ManifestFeatureCategory("Caching")]
 16[ShellFeature(
 17    DisplayName = "Caching Workflow Definitions",
 18    Description = "Provides caching for workflow definitions")]
 19[UsedImplicitly]
 20public class CachingWorkflowDefinitionsFeature : IShellFeature
 21{
 22    public void ConfigureServices(IServiceCollection services)
 23    {
 024        services.AddSingleton<IWorkflowDefinitionCacheManager, WorkflowDefinitionCacheManager>();
 025        services.Decorate<IWorkflowDefinitionStore, CachingWorkflowDefinitionStore>();
 026        services.Decorate<IWorkflowDefinitionService, CachingWorkflowDefinitionService>();
 027        services.AddNotificationHandler<EvictWorkflowDefinitionServiceCache>();
 028    }
 29}
 30
 31