public static HashCodeBuilder WithCaseInsensitiveString(this HashCodeBuilder builder, string value) { if (string.IsNullOrWhiteSpace(value)) { return(builder); } var hashCode = builder.Value * PrimeNumberForHashCodeCalculation + StringComparer.OrdinalIgnoreCase.GetHashCode(value); return(HashCodeBuilder.CreateWithValue(hashCode)); }
public static HashCodeBuilder Build(this HashCodeBuilder builder) { return(builder); }
public static HashCodeBuilder Add(this HashCodeBuilder builder, HashCodeBuilder toAdd) { var hashCode = builder.Value * PrimeNumberForHashCodeCalculation + toAdd.Value; return(HashCodeBuilder.CreateWithValue(hashCode)); }
public static HashCodeBuilder WithDecimal(this HashCodeBuilder builder, decimal value) { var hashCode = builder.Value * PrimeNumberForHashCodeCalculation + value.GetHashCode(); return(HashCodeBuilder.CreateWithValue(hashCode)); }