< Summary

Information
Class: Elsa.Extensions.ModuleExtensions
Assembly: Elsa.Http
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Extensions/ModuleExtensions.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 29
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
UseHttp(...)100%11100%
UseCache(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Http/Extensions/ModuleExtensions.cs

#LineLine coverage
 1using Elsa.Features.Services;
 2using Elsa.Http.Features;
 3
 4// ReSharper disable once CheckNamespace
 5namespace Elsa.Extensions;
 6
 7/// <summary>
 8/// Provides extensions to install the <see cref="HttpFeature"/> feature.
 9/// </summary>
 10public static class ModuleExtensions
 11{
 12    /// <summary>
 13    /// Install the <see cref="HttpFeature"/> feature.
 14    /// </summary>
 15    public static IModule UseHttp(this IModule module, Action<HttpFeature>? configure = default)
 16    {
 617        module.Configure(configure);
 618        return module;
 19    }
 20
 21    /// <summary>
 22    /// Install the <see cref="HttpCacheFeature"/> feature to speed up HTTP workflows. Like, a lot.
 23    /// </summary>
 24    public static HttpFeature UseCache(this HttpFeature feature, Action<HttpCacheFeature>? configure = default)
 25    {
 226        feature.Module.Configure(configure);
 227        return feature;
 28    }
 29}