Mark IActivityFactory and related methods as obsolete; add ActivityFactoryExtensions for backward compatibility
This commit is contained in:
parent
33af795704
commit
8fd38a9949
|
|
@ -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<T>(this IActivityFactory factory, ActivityConstructorContext context)
|
||||
{
|
||||
return factory.Create(typeof(T), context);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue