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:
Nokecy 2024-07-12 04:10:57 +08:00 committed by GitHub
parent 88f657e940
commit d37e312f7a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 10 additions and 2 deletions

View file

@ -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)

View file

@ -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);
}
}
}