< Summary

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

File(s)

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

#LineLine coverage
 1using Elsa.Features.Services;
 2using Elsa.WorkflowProviders.BlobStorage.Features;
 3using FluentStorage.Blobs;
 4using JetBrains.Annotations;
 5
 6// ReSharper disable once CheckNamespace
 7namespace Elsa.Extensions;
 8
 9/// <summary>
 10/// Extension methods for <see cref="IModule"/> to add the fluent storage workflow definition provider.
 11/// </summary>
 12[PublicAPI]
 13public static class ModuleExtensions
 14{
 15    /// <summary>
 16    /// Adds the fluent storage workflow definition provider.
 17    /// </summary>
 18    /// <param name="module">The module.</param>
 19    /// <param name="blobStorage">A callback that creates an <see cref="IBlobStorage"/>.</param>
 20    /// <returns>The module.</returns>
 21    public static IModule UseFluentStorageProvider(this IModule module, Func<IServiceProvider, IBlobStorage> blobStorage
 22    {
 223        return module.UseFluentStorageProvider(feature => feature.BlobStorage = blobStorage);
 24    }
 25
 26    /// <summary>
 27    /// Adds the fluent storage workflow definition provider.
 28    /// </summary>
 29    /// <param name="module">The module.</param>
 30    /// <param name="configure">The configuration delegate.</param>
 31    /// <returns>The module.</returns>
 32    public static IModule UseFluentStorageProvider(this IModule module, Action<BlobStorageFeature>? configure = null)
 33    {
 234        module.Use(configure);
 235        return module;
 36    }
 37}