Ejemplo n.º 1
0
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = ClientId != null?ClientId.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ (ApplicationName != null ? ApplicationName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (EnvironmentName != null ? EnvironmentName.GetHashCode() : 0);
                hashCode = (hashCode * 397) ^ (ConfigurationName != null ? ConfigurationName.GetHashCode() : 0);
                return(hashCode);
            }
        }
Ejemplo n.º 2
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);
     }
 }