public void Equals(CompareInfo compare1, object value, bool expected) { Assert.Equal(expected, compare1.Equals(value)); if (value is CompareInfo) { Assert.Equal(expected, compare1.GetHashCode().Equals(value.GetHashCode())); } }
public override int GetHashCode() { return(_compareInfo.GetHashCode() ^ ((int)_options & 0x7FFFFFFF)); }
public override int GetHashCode() { int hashCode = _compareInfo.GetHashCode(); return((_ignoreCase ? (~hashCode) : hashCode) ^ ((int)(_entropy & 0x7FFFFFFF))); }
public override int GetHashCode() { int hashCode = _compareInfo.GetHashCode(); return(_ignoreCase ? (~hashCode) : hashCode); }
public override int GetHashCode() { int hashCode = _compareInfo.GetHashCode(); return(_options == CompareOptions.None ? hashCode : ~hashCode); }
public void GetHashCode(string source1, CompareOptions options1, string source2, CompareOptions options2, bool expected) { CompareInfo invariantCompare = CultureInfo.InvariantCulture.CompareInfo; Assert.Equal(expected, invariantCompare.GetHashCode(source1, options1).Equals(invariantCompare.GetHashCode(source2, options2))); }
public static void GetHashCodeOfStringNullSource() { CompareInfo ci = CultureInfo.InvariantCulture.CompareInfo; Assert.Throws <ArgumentNullException>(() => ci.GetHashCode(null, CompareOptions.None)); }
public override int GetHashCode(string obj) { ArgumentNullException.ThrowIfNull(obj); return(_compareInfo.GetHashCode(obj, _options)); }
public int GetHashCode(string obj) { return(compareInfo.GetHashCode(obj, options)); }