Files
jinko.yikatong/Src/Dlhis.ScheduledTask/Common/GetHashCodeExtensions.cs
2024-04-03 18:16:27 +08:00

17 lines
372 B
C#

namespace Dlhis.ScheduledTask.Common;
internal static class GetHashCodeExtensions
{
public static int SafeGetHashCode(this object o)
{
if (o == null) return 0;
if(string.IsNullOrEmpty(o.ToString())) return 0;
return o.GetHashCode();
}
public static int SafeGetHashCode(this int o)
{
return o.GetHashCode();
}
}