ke_junjie
2025-06-04 84620534eb627e95811b971a4b552b6a177829bf
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 Furion.Extras.iWare.Wms.Service.LowCode.Dto;
using System.Diagnostics.CodeAnalysis;
 
namespace Furion.Extras.iWare.Wms.Service.LowCode
{
    public class GenEntityComparer : IEqualityComparer<GenEntity>
    {
        public bool Equals(GenEntity x, GenEntity y)
        {
            bool result = true;
            if (x == null && y == null)
            {
                result = true;
            }
            else if (x == null ^ y == null)
            {
                result = false;
            }
            else
            {
                result = (x.TableDesc == y.TableDesc) &&
                    (x.ClassName == y.ClassName) &&
                    (x.TableName == y.TableName) &&
                    (x.NameSpace == y.NameSpace);
            }
            return result;
        }
 
        public int GetHashCode([DisallowNull] GenEntity obj)
        {
            return obj == null ? 0 : obj.ToString().GetHashCode();
        }
    }
}