feat: Modify the access level of FlowScope type and add Remove to specify the activity method (#5752)
* update hangfire version to 1.8.5 * fix: fix hashSet deserialize error * fix: replace HashSet to ISet<T> * Update polymorphic converter and tests * feat: Modify the access level of FlowScope type and add Remove to specify the activity method --------- Co-authored-by: Sipke Schoorstra <sipkeschoorstra@outlook.com>
This commit is contained in:
parent
88f657e940
commit
d37e312f7a
|
|
@ -19,7 +19,7 @@ namespace Elsa.Workflows.Activities.Flowchart.Activities;
|
|||
[Browsable(false)]
|
||||
public class Flowchart : Container
|
||||
{
|
||||
internal const string ScopeProperty = "Scope";
|
||||
public const string ScopeProperty = "Scope";
|
||||
|
||||
/// <inheritdoc />
|
||||
public Flowchart([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@ using Elsa.Workflows.Contracts;
|
|||
|
||||
namespace Elsa.Workflows.Activities.Flowchart.Models;
|
||||
|
||||
internal class FlowScope
|
||||
public class FlowScope
|
||||
{
|
||||
[JsonConstructor]
|
||||
public FlowScope()
|
||||
|
|
@ -79,4 +79,12 @@ internal class FlowScope
|
|||
public long GetExecutionCount(IActivity activity) => Activities.ContainsKey(activity.Id) ? Activities[activity.Id].ExecutionCount : 0;
|
||||
|
||||
public void Clear() => Activities.Clear();
|
||||
|
||||
public void Remove(IActivity activity)
|
||||
{
|
||||
if (Activities.ContainsKey(activity.Id))
|
||||
{
|
||||
Activities.Remove(activity.Id);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue