Skip to content

Commit

Permalink
Add default ctor to Inline
Browse files Browse the repository at this point in the history
This fixes the issue where composite coded activities contain Inline activities that cannot be serialized otherwise.
  • Loading branch information
sfmskywalker committed Mar 9, 2023
1 parent 3128838 commit 2dfc9e9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/modules/Elsa.Workflows.Core/Activities/Inline.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using System.ComponentModel;
using System.Runtime.CompilerServices;
using System.Text.Json.Serialization;
using Elsa.Expressions.Models;
using Elsa.Workflows.Core.Attributes;
using Elsa.Workflows.Core.Models;
Expand All @@ -15,6 +16,12 @@ public class Inline : CodeActivity
{
private readonly Func<ActivityExecutionContext, ValueTask> _activity;

/// <inheritdoc />
[JsonConstructor]
public Inline([CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line)
{
}

/// <inheritdoc />
public Inline(Func<ActivityExecutionContext, ValueTask> activity, [CallerFilePath] string? source = default, [CallerLineNumber] int? line = default) : base(source, line)
{
Expand Down

0 comments on commit 2dfc9e9

Please sign in to comment.