public void SourceNameHashCodeIsUniqueForDifferentNames() { SourceName a = "A"; SourceName b = "a"; Assert.AreNotEqual(a.GetHashCode(), b.GetHashCode()); }
public void SourceNameHashCodeIsEqualForEqualNames() { SourceName a = "A"; SourceName b = "A"; Assert.AreEqual(a.GetHashCode(), b.GetHashCode()); }
public override int GetHashCode() { int result = 17; result = 31 * result + (SourceName == null ? 0 : SourceName.GetHashCode()); result = 31 * result + (CultureInfo == null && CultureInfo.Name != null ? 0 : CultureInfo.Name.GetHashCode()); return(result); }
/// <inheritdoc /> public override int GetHashCode() { unchecked { int hashCode = 0; hashCode = (hashCode * 397) ^ (int)SourceId; hashCode = (hashCode * 397) ^ (SourceName != null ? SourceName.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { var hashCode = (SourceName != null ? SourceName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (LocalName != null ? LocalName.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Path != null ? Path.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { unchecked { int hashCode = SourceIdentifier.GetHashCode(); hashCode = (hashCode * 397) ^ (SourceName?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ PhysicalOutput.GetHashCode(); hashCode = (hashCode * 397) ^ LayerNumber.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Flags; hashCode = (hashCode * 397) ^ Width.GetHashCode(); hashCode = (hashCode * 397) ^ Height.GetHashCode(); return(hashCode); } }
/// <inheritdoc/> public override int GetHashCode() { // Overflow is fine, just wrap. unchecked { int hash = 17; hash *= 23 + ApplicationName.GetHashCode(); hash *= 23 + ApplicationSystemId.GetHashCode(); hash *= 23 + ApplicationVersion.GetHashCode(); hash *= 23 + ContentDescription.GetHashCode(); hash *= 23 + Copyright.GetHashCode(); hash *= 23 + Corporation.GetHashCode(); hash *= 23 + CorporationAddress.GetHashCode(); hash *= 23 + Filename.GetHashCode(); hash *= 23 + Language.GetHashCode(); hash *= 23 + SourceCopyright.GetHashCode(); hash *= 23 + SourceDate.GetHashCode(); hash *= 23 + SourceName.GetHashCode(); hash *= 23 + TransmissionDate.GetHashCode(); return(hash); } }
/// <inheritdoc /> public override int GetHashCode() { return(Mathf.Abs(SourceName.GetHashCode())); }
/// <inheritdoc /> public int GetHashCode(object obj) { return(Mathf.Abs(SourceName.GetHashCode())); }
/// <inheritdoc /> int IEqualityComparer.GetHashCode(object obj) { return(Mathf.Abs(SourceName.GetHashCode())); }
public override int GetHashCode() { return(this.ProviderID.GetHashCode() * 13 + SourceName.GetHashCode() * 7); }
/// <summary> /// Returns the hash code for this event. /// </summary> /// <returns>A 32-bit signed integer hash code.</returns> public override int GetHashCode() => Hash.Combine(SourceName?.GetHashCode() ?? 0, EventName?.GetHashCode() ?? 0);
/// <inheritdoc /> public override int GetHashCode() { return(SourceName.GetHashCode()); }
public override int GetHashCode() { int hash = 1; if (TraceId.Length != 0) { hash ^= TraceId.GetHashCode(); } if (SpanId.Length != 0) { hash ^= SpanId.GetHashCode(); } if (ParentSpanId.Length != 0) { hash ^= ParentSpanId.GetHashCode(); } if (SpanName.Length != 0) { hash ^= SpanName.GetHashCode(); } if (startTime_ != null) { hash ^= StartTime.GetHashCode(); } if (endTime_ != null) { hash ^= EndTime.GetHashCode(); } hash ^= SpanTags.GetHashCode(); if (HttpStatusCode != 0L) { hash ^= HttpStatusCode.GetHashCode(); } if (ClientSpan != false) { hash ^= ClientSpan.GetHashCode(); } if (RewriteClientSpanId != false) { hash ^= RewriteClientSpanId.GetHashCode(); } if (SourceName.Length != 0) { hash ^= SourceName.GetHashCode(); } if (sourceIp_ != null) { hash ^= SourceIp.GetHashCode(); } if (DestinationName.Length != 0) { hash ^= DestinationName.GetHashCode(); } if (destinationIp_ != null) { hash ^= DestinationIp.GetHashCode(); } if (RequestSize != 0L) { hash ^= RequestSize.GetHashCode(); } if (RequestTotalSize != 0L) { hash ^= RequestTotalSize.GetHashCode(); } if (ResponseSize != 0L) { hash ^= ResponseSize.GetHashCode(); } if (ResponseTotalSize != 0L) { hash ^= ResponseTotalSize.GetHashCode(); } if (ApiProtocol.Length != 0) { hash ^= ApiProtocol.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }