|
1 | 1 | namespace EnoCore.Models |
2 | 2 | { |
3 | | - public sealed record CheckerTaskMessage( |
4 | | - long TaskId, |
5 | | - CheckerTaskMethod Method, |
6 | | - string Address, |
7 | | - long TeamId, |
8 | | - string TeamName, |
9 | | - long CurrentRoundId, |
10 | | - long RelatedRoundId, |
11 | | - string? Flag, |
12 | | - long VariantId, |
13 | | - long Timeout, |
14 | | - long RoundLength, |
15 | | - string TaskChainId); |
| 3 | + using System; |
| 4 | + using System.Diagnostics.CodeAnalysis; |
| 5 | + |
| 6 | + public class CheckerTaskMessage |
| 7 | + { |
| 8 | + public CheckerTaskMessage( |
| 9 | + long? taskId, |
| 10 | + CheckerTaskMethod? method, |
| 11 | + string? address, |
| 12 | + long? teamId, |
| 13 | + string? teamName, |
| 14 | + long? currentRoundId, |
| 15 | + long? relatedRoundId, |
| 16 | + string? flag, |
| 17 | + long? variantId, |
| 18 | + long? timeout, |
| 19 | + long? roundLength, |
| 20 | + string? taskChainId) |
| 21 | + { |
| 22 | + this.TaskId = taskId ?? throw new ArgumentNullException(nameof(taskId)); |
| 23 | + this.Method = method ?? throw new ArgumentNullException(nameof(method)); |
| 24 | + this.Address = address ?? throw new ArgumentNullException(nameof(address)); |
| 25 | + this.TeamId = teamId ?? throw new ArgumentNullException(nameof(teamId)); |
| 26 | + this.TeamName = teamName ?? throw new ArgumentNullException(nameof(teamName)); |
| 27 | + this.CurrentRoundId = currentRoundId ?? throw new ArgumentNullException(nameof(currentRoundId)); |
| 28 | + this.RelatedRoundId = relatedRoundId ?? throw new ArgumentNullException(nameof(relatedRoundId)); |
| 29 | + this.Flag = flag ?? throw new ArgumentNullException(nameof(flag)); |
| 30 | + this.VariantId = variantId ?? throw new ArgumentNullException(nameof(variantId)); |
| 31 | + this.Timeout = timeout ?? throw new ArgumentNullException(nameof(timeout)); |
| 32 | + this.RoundLength = roundLength ?? throw new ArgumentNullException(nameof(roundLength)); |
| 33 | + this.TaskChainId = taskChainId ?? throw new ArgumentNullException(nameof(taskChainId)); |
| 34 | + } |
| 35 | + |
| 36 | + [NotNull] |
| 37 | + public long? TaskId { get; } |
| 38 | + |
| 39 | + [NotNull] |
| 40 | + public CheckerTaskMethod? Method { get; } |
| 41 | + |
| 42 | + [NotNull] |
| 43 | + public string? Address { get; } |
| 44 | + |
| 45 | + [NotNull] |
| 46 | + public long? TeamId { get; } |
| 47 | + |
| 48 | + [NotNull] |
| 49 | + public string? TeamName { get; } |
| 50 | + |
| 51 | + [NotNull] |
| 52 | + public long? CurrentRoundId { get; } |
| 53 | + |
| 54 | + [NotNull] |
| 55 | + public long? RelatedRoundId { get; } |
| 56 | + |
| 57 | + [NotNull] |
| 58 | + public string? Flag { get; } |
| 59 | + |
| 60 | + [NotNull] |
| 61 | + public long? VariantId { get; } |
| 62 | + |
| 63 | + [NotNull] |
| 64 | + public long? Timeout { get; } |
| 65 | + |
| 66 | + [NotNull] |
| 67 | + public long? RoundLength { get; } |
| 68 | + |
| 69 | + [NotNull] |
| 70 | + public string? TaskChainId { get; } |
| 71 | + } |
16 | 72 | } |
0 commit comments