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
| namespace IStation.Dto
| {
| /// <summary>
| /// 调度配置
| /// </summary>
| public class ChScheduleConfigInput
| {
| /// <summary>
| /// 一输水
| /// </summary>
| public ScheduleConfigDto Station1 { get; set; }
|
|
| /// <summary>
| /// 二输水
| /// </summary>
| public ScheduleConfigDto Station2 { get; set; }
|
| /// <summary>
| /// 验证
| /// </summary>
| public IEnumerable<ValidationResult> Validate(ValidationContext validationContext)
| {
| if (Station1 == null)
| {
| yield return
| new ValidationResult("Station1 不能为空", new[] { nameof(Station1) });
| }
|
| if (Station2 == null)
| {
| yield return
| new ValidationResult("Station2 不能为空", new[] { nameof(Station2) });
| }
|
| }
|
|
|
|
| }
| }
|
|