< Summary

Information
Class: Elsa.ShellFeatures.ElsaFastEndpointsFeature
Assembly: Elsa.Api.Common
File(s): /home/runner/work/elsa-core/elsa-core/src/common/Elsa.Api.Common/ShellFeatures/ElsaFastEndpointsFeature.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 4
Coverable lines: 4
Total lines: 26
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/common/Elsa.Api.Common/ShellFeatures/ElsaFastEndpointsFeature.cs

#LineLine coverage
 1using CShells.FastEndpoints.Contracts;
 2using CShells.FastEndpoints.Features;
 3using CShells.Features;
 4using Elsa.Extensions;
 5using Elsa.FastEndpointConfigurators;
 6using JetBrains.Annotations;
 7using Microsoft.Extensions.DependencyInjection;
 8
 9namespace Elsa.ShellFeatures;
 10
 11/// <summary>
 12/// Registers the Elsa-specific FastEndpoints configurator and the permission model.
 13/// This feature should be enabled alongside the CShells FastEndpointsFeature to apply Elsa's serialization settings.
 14/// </summary>
 15[ShellFeature(DependsOn = [typeof(FastEndpointsFeature)])]
 16[UsedImplicitly]
 17public class ElsaFastEndpointsFeature : IShellFeature
 18{
 19    /// <inheritdoc />
 20    public void ConfigureServices(IServiceCollection services)
 21    {
 022        services.AddSingleton<IFastEndpointsConfigurator, ElsaFastEndpointsConfigurator>();
 023        services.AddElsaAuthorization();
 024        services.AddPermissionDescriptorsFromLoadedAssemblies();
 025    }
 26}