/// <inheritdoc /> public override int GetHashCode() { unchecked { var hashCode = Position != null?Position.GetHashCode() : 0; hashCode = (hashCode * 397) ^ (int)Width; hashCode = (hashCode * 397) ^ (int)Height; hashCode = (hashCode * 397) ^ (int)MeasuredWidth; hashCode = (hashCode * 397) ^ (int)MeasuredHeight; hashCode = (hashCode * 397) ^ (Margin != null ? Margin.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Border != null ? Border.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (Padding != null ? Padding.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (int)Direction; hashCode = (hashCode * 397) ^ ComputedFlexBasisGeneration; hashCode = (hashCode * 397) ^ ComputedFlexBasis.GetHashCode(); hashCode = (hashCode * 397) ^ HadOverflow.GetHashCode(); hashCode = (hashCode * 397) ^ GenerationCount; hashCode = (hashCode * 397) ^ (int)LastOwnerDirection; hashCode = (hashCode * 397) ^ NextCachedMeasurementsIndex; hashCode = (hashCode * 397) ^ (CachedMeasurements != null ? CachedMeasurements.GetHashCode() : 0); hashCode = (hashCode * 397) ^ (CachedLayout != null ? CachedLayout.GetHashCode() : 0); return(hashCode); } }
public override int GetHashCode() { int hash = 1; if (Version != 0) { hash ^= Version.GetHashCode(); } if (Padding != false) { hash ^= Padding.GetHashCode(); } if (Extension != false) { hash ^= Extension.GetHashCode(); } if (CsrcCount != 0) { hash ^= CsrcCount.GetHashCode(); } if (Marker != false) { hash ^= Marker.GetHashCode(); } if (PayloadType != 0) { hash ^= PayloadType.GetHashCode(); } if (_unknownFields != null) { hash ^= _unknownFields.GetHashCode(); } return(hash); }
public void Padding_Equals_Invoke_ReturnsExpected(Padding padding, object other, bool expected) { if (other is Padding otherPadding) { Assert.Equal(expected, padding == otherPadding); Assert.Equal(!expected, padding != otherPadding); Assert.Equal(expected, padding.GetHashCode().Equals(otherPadding.GetHashCode())); } Assert.Equal(expected, padding.Equals(other)); }
/// <summary> /// <para>Returns a unique hash for this of <see cref="AssetIconsCameraSetup"/>.</para> /// </summary> /// <returns> /// <para>An <see cref="int"/> that represents a unique has of this instance.</para> /// </returns> public override int GetHashCode() { int hashCode = -1977805934; hashCode = hashCode * -1521134295 + Padding.GetHashCode(); hashCode = hashCode * -1521134295 + PreviewDirection.GetHashCode(); hashCode = hashCode * -1521134295 + TransparentBackground.GetHashCode(); hashCode = hashCode * -1521134295 + BackgroundColor.GetHashCode(); hashCode = hashCode * -1521134295 + Orthographic.GetHashCode(); return(hashCode); }
public override int GetHashCode() { unchecked { var hashCode = PrePadding?.GetHashCode() ?? 0; hashCode = (hashCode * 397) ^ (ValueFormat?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (Padding?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (SymbolFormat?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (PostPadding?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ (ErrorText?.GetHashCode() ?? 0); hashCode = (hashCode * 397) ^ Unit.GetHashCode(); return(hashCode); } }
public override int GetHashCode() { return(this.GetType().FullName.GetHashCode() ^ Flags.GetHashCode() ^ Align.GetHashCode() ^ Prefix.GetHashCode() ^ Padding.GetHashCode()); }