Пример #1
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = AgentID;
         hashCode = (hashCode * 397) ^ (MachineID != null ? MachineID.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DeviceGuid != null ? DeviceGuid.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ CustomerID;
         hashCode = (hashCode * 397) ^ (CustomerName != null ? CustomerName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ FolderID.GetHashCode();
         hashCode = (hashCode * 397) ^ (AgentName != null ? AgentName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (SystemName != null ? SystemName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DomainName != null ? DomainName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (CurrentLoggedUsers != null ? CurrentLoggedUsers.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ComputerDescription != null ? ComputerDescription.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Monitored.GetHashCode();
         hashCode = (hashCode * 397) ^ LastPatchManagementReceived.GetHashCode();
         hashCode = (hashCode * 397) ^ (AgentVersion != null ? AgentVersion.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Favorite.GetHashCode();
         hashCode = (hashCode * 397) ^ ThresholdID.GetHashCode();
         hashCode = (hashCode * 397) ^ MonitoredAgentID.GetHashCode();
         hashCode = (hashCode * 397) ^ Created.GetHashCode();
         hashCode = (hashCode * 397) ^ Modified.GetHashCode();
         hashCode = (hashCode * 397) ^ Online.GetHashCode();
         hashCode = (hashCode * 397) ^ (ReportedFromIP != null ? ReportedFromIP.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (AppViewUrl != null ? AppViewUrl.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Motherboard != null ? Motherboard.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Processor != null ? Processor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Memory.GetHashCode();
         hashCode = (hashCode * 397) ^ (Display != null ? Display.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Sound != null ? Sound.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ ProcessorCoresCount.GetHashCode();
         hashCode = (hashCode * 397) ^ (SystemDrive != null ? SystemDrive.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProcessorClock != null ? ProcessorClock.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Vendor != null ? Vendor.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VendorSerialNumber != null ? VendorSerialNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (VendorBrandModel != null ? VendorBrandModel.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (ProductName != null ? ProductName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OS != null ? OS.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OSType != null ? OSType.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OSVersion != null ? OSVersion.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OSBuild != null ? OSBuild.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (WindowsSerialNumber != null ? WindowsSerialNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (Office != null ? Office.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OfficeSP != null ? OfficeSP.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ OfficeOEM.GetHashCode();
         hashCode = (hashCode * 397) ^ (OfficeSerialNumber != null ? OfficeSerialNumber.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (OfficeFullVersion != null ? OfficeFullVersion.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (LastLoginUser != null ? LastLoginUser.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (HardwareDisks?.Sum(x => x.GetHashCode()) ?? 0);
         hashCode = (hashCode * 397) ^ (MacAddresses?.Sum(x => x.GetHashCode()) ?? 0);
         hashCode = (hashCode * 397) ^ (IpAddresses?.Sum(x => x.GetHashCode()) ?? 0);
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = ProcessorCount;
         hashCode = (hashCode * 397) ^ TotalPhysicalMemory.GetHashCode();
         hashCode = (hashCode * 397) ^ (CommandLine?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ProcessName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ProcessId?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Architecture?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OSName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OSVersion?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (IpAddress?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MachineName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (InstallId?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (RuntimeVersion?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Data?.GetCollectionHashCode() ?? 0);
         return(hashCode);
     }
 }
Пример #3
0
 public override int GetHashCode()
 {
     unchecked {
         var hashCode = ProcessorCount;
         hashCode = (hashCode * 397) ^ TotalPhysicalMemory.GetHashCode();
         hashCode = (hashCode * 397) ^ (CommandLine == null ? 0 : CommandLine.GetHashCode());
         hashCode = (hashCode * 397) ^ (ProcessName == null ? 0 : ProcessName.GetHashCode());
         hashCode = (hashCode * 397) ^ (ProcessId == null ? 0 : ProcessId.GetHashCode());
         hashCode = (hashCode * 397) ^ (Architecture == null ? 0 : Architecture.GetHashCode());
         hashCode = (hashCode * 397) ^ (OSName == null ? 0 : OSName.GetHashCode());
         hashCode = (hashCode * 397) ^ (OSVersion == null ? 0 :OSVersion.GetHashCode());
         hashCode = (hashCode * 397) ^ (IpAddress == null ? 0 : IpAddress.GetHashCode());
         hashCode = (hashCode * 397) ^ (MachineName == null ? 0 : MachineName.GetHashCode());
         hashCode = (hashCode * 397) ^ (InstallId == null ? 0 : InstallId.GetHashCode());
         hashCode = (hashCode * 397) ^ (RuntimeVersion == null ? 0 : RuntimeVersion.GetHashCode());
         hashCode = (hashCode * 397) ^ (Data == null ? 0 : Data.GetCollectionHashCode());
         return(hashCode);
     }
 }