diff --git a/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs b/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs index deadc5337..cb41ef2de 100644 --- a/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs +++ b/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs @@ -5,5 +5,16 @@ namespace Elsa.Workflows; [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")] public interface IActivityFactory { + [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")] IActivity Create(Type type, ActivityConstructorContext context); +} + +[Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")] +public static class ActivityFactoryExtensions +{ + [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")] + public static IActivity CreateActivity(this IActivityFactory factory, ActivityConstructorContext context) + { + return factory.Create(typeof(T), context); + } } \ No newline at end of file