Revert ChecklistItem back from Record to Class and remove left over RadioListActivity. Update Nuget packages.

This commit is contained in:
Matt 2025-06-06 00:44:10 +01:00
parent 4530dfd1f7
commit 2dbd050e64
2 changed files with 8 additions and 43 deletions

View file

@ -1,42 +0,0 @@
using System.Runtime.CompilerServices;
using Elsa.Workflows;
using Elsa.Workflows.Attributes;
using Elsa.Workflows.UIHints;
using Elsa.Workflows.Models;
// ReSharper disable once CheckNamespace
namespace Elsa.Server.Web;
/// <summary>
/// Executes C# code.
/// </summary>
[Activity("Elsa", "TESTS", "Tests Radio List Functionality", DisplayName = "TEST")]
public class TestRadioList : CodeActivity<object?>
{
/// <inheritdoc />
public TestRadioList([CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : base(source, line)
{
}
/// <inheritdoc />
public TestRadioList(string script, [CallerFilePath] string? source = null, [CallerLineNumber] int? line = null) : this(source, line)
{
}
/// <summary>
/// The script to run.
/// </summary>
[Input(
Description = "Choose to download one file or entire folder",
DefaultValue = "File",
Options = new[] { "File", "Folder" },
UIHint = InputUIHints.RadioList
)]
public Input<string> SelectedRadioOption { get; set; } = default!;
/// <inheritdoc />
protected override async ValueTask ExecuteAsync(ActivityExecutionContext context)
{
}
}

View file

@ -3,4 +3,11 @@ namespace Elsa.Api.Client.Shared.UIHints.CheckList;
/// <summary>
/// Represents an item in a <see cref="CheckList"/>.
/// </summary>
public record CheckListItem(string Text, string Value, bool IsChecked);
public class CheckListItem
{
#pragma warning disable CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public string Text { get; set; }
public string Value { get; set; }
#pragma warning restore CS8618 // Non-nullable field must contain a non-null value when exiting constructor. Consider declaring as nullable.
public bool IsChecked { get; set; }
}