public override int GetHashCode()
 {
     unchecked
     {
         return(((MachineName != null ? MachineName.GetHashCode() : 0) * 397) ^ Thread);
     }
 }
Example #2
0
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = UniqueID;
         hashCode = (hashCode * 397) ^ (Name != null ? Name.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         return(hashCode);
     }
 }
Example #3
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);
     }
 }
Example #4
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (TestRunDirectory != null ? TestRunDirectory.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ RunningDateTime.GetHashCode();
         return(hashCode);
     }
 }
 public override int GetHashCode()
 {
     unchecked
     {
         int x = 27;
         x = x * 11 + MachineName.GetHashCode();
         x = x * 11 + Pass.GetHashCode();
         return(x);
     }
 }
Example #6
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = AssetId.GetHashCode();
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ IsJohnDoe.GetHashCode();
         hashCode = (hashCode * 397) ^ AssetUid.GetHashCode();
         return(hashCode);
     }
 }
Example #7
0
File: PCNode.cs Project: Nucs/nlib
 public override int GetHashCode()
 {
     unchecked {
         int hashCode = base.GetHashCode();
         hashCode = (hashCode * 397) ^ (MacAddress?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MachineName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (IP?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (PCID?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #8
0
        // ReSharper disable once MemberCanBePrivate.Global
        public override int GetHashCode()
        {
            int hashCode = HashKey +
                           At.GetHashCode() +
                           MachineName.GetHashCode() +
                           ThreadName.GetHashCode() +
                           Type.GetHashCode() +
                           Level.Priority() +
                           Line.GetHashCode();

            return(hashCode);
        }
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = Duration.GetHashCode();
         hashCode = (hashCode * 397) ^ (ValidationExpression?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Instance?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Name?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (Category?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MachineName?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #10
0
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = (ServiceName != null ? ServiceName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ (DisplayName != null ? DisplayName.GetHashCode() : 0);
         hashCode = (hashCode * 397) ^ Status.GetHashCode();
         hashCode = (hashCode * 397) ^ CanStart.GetHashCode();
         hashCode = (hashCode * 397) ^ CanPause.GetHashCode();
         hashCode = (hashCode * 397) ^ CanStop.GetHashCode();
         return(hashCode);
     }
 }
Example #11
0
 /// <summary>
 ///
 /// </summary>
 /// <returns></returns>
 public override int GetHashCode()
 {
     unchecked
     {
         int hash = 17;
         hash = hash * 31 + MachineName.GetHashCode();
         hash = hash * 31 + Url.GetHashCode();
         foreach (var ad in AudioDevices)
         {
             hash = hash * 31 + ad.GetHashCode();
         }
         return(hash);
     }
 }
Example #12
0
        /// <summary>
        /// Gets a unique-enough hash of this error.  Stored as a quick comparison mehanism to rollup duplicate errors.
        /// </summary>
        /// <returns>"Unique" hash for this error</returns>
        private int?GetHash()
        {
            if (!Detail.HasValue())
            {
                return(null);
            }

            var result = Detail.GetHashCode();

            if (RollupPerServer && MachineName.HasValue())
            {
                result = (result * 397) ^ MachineName.GetHashCode();
            }

            return(result);
        }
Example #13
0
 /// <inheritdoc />
 public override int GetHashCode()
 {
     unchecked
     {
         var hashCode = EntryAssemblyName?.GetHashCode() ?? 0;
         hashCode = (hashCode * 397) ^ (EntryAssemblyVersion?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (HostName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (LocalTimeString?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (MachineName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OperatingSystem?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (OperatingSystemVersion?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ProcessName?.GetHashCode() ?? 0);
         hashCode = (hashCode * 397) ^ (ProcessorCount?.GetHashCode() ?? 0);
         return(hashCode);
     }
 }
Example #14
0
        /// <summary>
        /// Gets a unique-enough hash of this log item.  Stored as a quick comparison mehanism to rollup duplicate log items.
        /// </summary>
        /// <returns>"Unique" hash for this log item</returns>
        public int?GetHash()
        {
            if (!Message.HasValue())
            {
                return(null);
            }

            var result = Message.GetHashCode();

            if (MachineName.HasValue())
            {
                result = (result * 397) ^ MachineName.GetHashCode();
            }

            return(result);
        }
        /// <summary>
        /// Gets a unique-enough hash of this error. Stored as a quick comparison mechanism to roll-up duplicate errors.
        /// </summary>
        /// <param name="includeMachine">Whether to include <see cref="MachineName"/> in the has calculation, creating per-machine roll-ups.</param>
        /// <returns>A "Unique" hash for this error.</returns>
        public int?GetHash(bool includeMachine)
        {
            if (!Detail.HasValue())
            {
                return(null);
            }

            var result = Detail.GetHashCode();

            if (includeMachine && MachineName.HasValue())
            {
                result = (result * 397) ^ MachineName.GetHashCode();
            }

            return(result);
        }
Example #16
0
        private int?GetHash()
        {
            if (string.IsNullOrEmpty(Detail))
            {
                return(null);
            }

            var result = Detail.GetHashCode();

            if (!string.IsNullOrEmpty(MachineName))
            {
                result = (result * 397) ^ MachineName.GetHashCode();
            }

            return(result);
        }
 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);
     }
 }
Example #18
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = FrameworkDescription != null?FrameworkDescription.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (RunningEnvironment != null ? RunningEnvironment.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (EntryAssemblyName != null ? EntryAssemblyName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (EntryAssemblyVersion != null ? EntryAssemblyVersion.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (LocalTimeString != null ? LocalTimeString.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (MachineName != null ? MachineName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (OperatingSystemPlatform != null ? OperatingSystemPlatform.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (OperatingSystemArchitecture != null ? OperatingSystemArchitecture.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (OperatingSystemVersion != null ? OperatingSystemVersion.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ProcessArchitecture != null ? ProcessArchitecture.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ProcessorCount != null ? ProcessorCount.GetHashCode() : 0);
                return(hashCode);
            }
        }
Example #19
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);
     }
 }
Example #20
0
 public override int GetHashCode()
 {
     unchecked // overflow is fine, just wrap
     {
         var hash = 17;
         hash *= 23 + LogLevel.GetHashCode();
         hash *= 23 + (EnvironmentName != null ? EnvironmentName.GetHashCode() : 0);
         hash *= 23 + (ClientId.HasValue ? ClientId.GetHashCode() : 0);
         hash *= 23 + (ClientVersion != null ? ClientVersion.GetHashCode() : 0);
         hash *= 23 + (MachineName != null ? MachineName.GetHashCode() : 0);
         hash *= 23 + (TenantId.HasValue ? TenantId.GetHashCode() : 0);
         hash *= 23 + (UserId.HasValue ? UserId.GetHashCode() : 0);
         hash *= 23 + (UserName != null ? UserName.GetHashCode() : 0);
         hash *= 23 + (SessionId.HasValue ? SessionId.GetHashCode() : 0);
         hash *= 23 + (DeviceId.HasValue ? DeviceId.GetHashCode() : 0);
         hash *= 23 + (CorrelationId.HasValue ? CorrelationId.GetHashCode() : 0);
         hash *= 23 + (Source != null ? Source.GetHashCode() : 0);
         hash *= 23 + (Message != null ? Message.GetHashCode() : 0);
         hash *= 23 + (Callstack != null ? Callstack.GetHashCode() : 0);
         return(hash);
     }
 }
Example #21
0
 public override int GetHashCode()
 {
     return((SystemId.GetHashCode() * 397) ^ (DataFormatVersion.GetHashCode() * 397) ^
            (SoftwareVersion.GetHashCode() * 397) ^ (MachineName.GetHashCode() * 397) ^
            (MacAddress.GetHashCode() * 397) ^ (IPAddress.GetHashCode() * 397));
 }
Example #22
0
        private static void InitMachineName()
        {
            MachineName = Guid.NewGuid().ToString();

            WorkerId = MachineName.GetHashCode() % (2 << 10);
        }
Example #23
0
 public override int GetHashCode()
 {
     return(MachineName.GetHashCode() ^ ProcessId ^ DomainId.GetHashCode());
 }