コード例 #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = Pattern?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (PrimaryInterfacePattern?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ CPUWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ CPUCriticalPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ MemoryWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ MemoryCriticalPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ DiskWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ DiskCriticalPercent.GetHashCode();
         return(hashCode);
     }
 }
コード例 #2
0
ファイル: DashboardSettings.cs プロジェクト: zsbfree/Opserver
 public override int GetHashCode()
 {
     unchecked
     {
         int hashCode = (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Pattern != null ? Pattern.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (PrimaryInterfacePattern != null ? PrimaryInterfacePattern.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CPUWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ CPUCriticalPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ MemoryWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ MemoryCriticalPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ DiskWarningPercent.GetHashCode();
         hashCode = (hashCode * 397) ^ DiskCriticalPercent.GetHashCode();
         return(hashCode);
     }
 }