< Summary

Information
Class: Elsa.Workflows.ActivityFactoryExtensions
Assembly: Elsa.Workflows.Core
File(s): /home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs
Line coverage
0%
Covered lines: 0
Uncovered lines: 1
Coverable lines: 1
Total lines: 20
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
CreateActivity(...)100%210%

File(s)

/home/runner/work/elsa-core/elsa-core/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs

#LineLine coverage
 1using Elsa.Workflows.Models;
 2
 3namespace Elsa.Workflows;
 4
 5[Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")]
 6public interface IActivityFactory
 7{
 8    [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")]
 9    IActivity Create(Type type, ActivityConstructorContext context);
 10}
 11
 12[Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")]
 13public static class ActivityFactoryExtensions
 14{
 15    [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")]
 16    public static IActivity CreateActivity<T>(this IActivityFactory factory, ActivityConstructorContext context)
 17    {
 018        return factory.Create(typeof(T), context);
 19    }
 20}