< Summary

Information
Class: Elsa.Alterations.Extensions.ServiceCollectionExtensions
Assembly: Elsa.Alterations
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Alterations/Extensions/ServiceCollectionExtensions.cs
Line coverage
100%
Covered lines: 7
Uncovered lines: 0
Coverable lines: 7
Total lines: 27
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
AddAlterations(...)100%11100%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Alterations/Extensions/ServiceCollectionExtensions.cs

#LineLine coverage
 1using Elsa.Alterations.AlterationHandlers;
 2using Elsa.Alterations.AlterationTypes;
 3using Elsa.Alterations.Core.Extensions;
 4using Elsa.Alterations.Features;
 5using Microsoft.Extensions.DependencyInjection;
 6
 7namespace Elsa.Alterations.Extensions;
 8
 9/// <summary>
 10/// Extension methods for <see cref="IServiceCollection"/>.
 11/// </summary>
 12public static class ServiceCollectionExtensions
 13{
 14    /// <summary>
 15    /// Adds various alteration handlers.
 16    /// </summary>
 17    public static IServiceCollection AddAlterations(this IServiceCollection services)
 18    {
 219        services.AddAlteration<Migrate, MigrateHandler>();
 220        services.AddAlteration<ModifyVariable, ModifyVariableHandler>();
 221        services.AddAlteration<ScheduleActivity, ScheduleActivityHandler>();
 222        services.AddAlteration<CancelActivity, CancelActivityHandler>();
 223        services.AddAlteration<Cancel, CancelHandler>();
 224        services.AddNotificationHandlersFrom<AlterationsFeature>();
 225        return services;
 26    }
 27}