alielie
2025-03-11 2e54b439c64e0adbb7e010243c1f33aa5fc5f503
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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
 
namespace HMI.Core.Exceptions
{
    public class FormValidateException : Exception
    {
        public readonly List<FormGroupValidateResult> Result;
        public bool Success
        {
            get => Result == null || Result.Count == 0;
        }
 
        public FormValidateException()
        {
            Result = new List<FormGroupValidateResult>();
        }
    }
 
    public class FormGroupValidateResult
    {
        public readonly string Message;
        public readonly object Sender;
 
        public FormGroupValidateResult(string message, object sender)
        {
            Message = message;
            Sender = sender;
        }
    }
}