From b3d155de63be31e4bca481ed52bd4fc5340e1594 Mon Sep 17 00:00:00 2001 From: j03y-nxxbz Date: Tue, 20 Jan 2026 13:33:47 +0100 Subject: [PATCH] Actually, I should not have handled obsolete classes/interfaces. Handling that as it should without changing the contract --- src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs | 4 ++-- src/modules/Elsa.Workflows.Core/Services/ActivityFactory.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs b/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs index 4c3459b77..cb41ef2de 100644 --- a/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs +++ b/src/modules/Elsa.Workflows.Core/Contracts/IActivityFactory.cs @@ -6,14 +6,14 @@ namespace Elsa.Workflows; public interface IActivityFactory { [Obsolete("Use the CreateActivity method on the ActivityConstructorContext context itself")] - ActivityConstructionResult Create(Type type, ActivityConstructorContext context); + 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 ActivityConstructionResult CreateActivity(this IActivityFactory factory, ActivityConstructorContext context) + public static IActivity CreateActivity(this IActivityFactory factory, ActivityConstructorContext context) { return factory.Create(typeof(T), context); } diff --git a/src/modules/Elsa.Workflows.Core/Services/ActivityFactory.cs b/src/modules/Elsa.Workflows.Core/Services/ActivityFactory.cs index 3b29b0541..bcc81bf92 100644 --- a/src/modules/Elsa.Workflows.Core/Services/ActivityFactory.cs +++ b/src/modules/Elsa.Workflows.Core/Services/ActivityFactory.cs @@ -6,8 +6,8 @@ namespace Elsa.Workflows; public class ActivityFactory : IActivityFactory { /// - public ActivityConstructionResult Create(Type type, ActivityConstructorContext context) + public IActivity Create(Type type, ActivityConstructorContext context) { - return context.CreateActivity(type); + return context.CreateActivity(type).Activity; } } \ No newline at end of file