Actually, I should not have handled obsolete classes/interfaces.
Handling that as it should without changing the contract
This commit is contained in:
parent
4cd2c4cda6
commit
b3d155de63
|
|
@ -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<T>(this IActivityFactory factory, ActivityConstructorContext context)
|
||||
public static IActivity CreateActivity<T>(this IActivityFactory factory, ActivityConstructorContext context)
|
||||
{
|
||||
return factory.Create(typeof(T), context);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@ namespace Elsa.Workflows;
|
|||
public class ActivityFactory : IActivityFactory
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public ActivityConstructionResult Create(Type type, ActivityConstructorContext context)
|
||||
public IActivity Create(Type type, ActivityConstructorContext context)
|
||||
{
|
||||
return context.CreateActivity(type);
|
||||
return context.CreateActivity(type).Activity;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue