forked from ZeraGmbH/Blockly.Net
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathUserInputRequest.cs
More file actions
48 lines (42 loc) · 1.28 KB
/
Copy pathUserInputRequest.cs
File metadata and controls
48 lines (42 loc) · 1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
using System.ComponentModel.DataAnnotations;
using System.Diagnostics.CodeAnalysis;
namespace BlocklyNet.Scripting.Engine;
/// <summary>
/// A script requires some user input - currently only
/// numbers are supported.
/// </summary>
public class UserInputRequestBase
{
/// <summary>
/// The unique identifier of the active script.
/// </summary>
[Required, NotNull]
public string JobId { get; set; } = null!;
/// <summary>
/// Some unique input key identifying the requested
/// input. This can be used for dynamic translations.
/// </summary>
[Required, NotNull]
public string Key { get; set; } = null!;
/// <summary>
/// Optional type of value. May be set to void to just
/// report something without requesting a value.
/// </summary>
public string? ValueType { get; set; }
}
/// <summary>
/// A script requires some user input - currently only
/// numbers are supported.
/// </summary>
public class UserInputRequest : UserInputRequestBase
{
/// <summary>
/// Exact time the request was started.
/// </summary>
[Required, NotNull]
public DateTime StartedAt { get; set; }
/// <summary>
/// Optional delay to auto-close the request.
/// </summary>
public double? SecondsToAutoClose { get; set; }
}