public int GetHashCode(ItemWithQuantity <TValue> obj) { return(_valueComparer.GetHashCode(obj.Item) ^ obj.Quantity); }
public bool Equals(ItemWithQuantity <TValue> x, ItemWithQuantity <TValue> y) { return((x.Quantity == y.Quantity) && _valueComparer.Equals(x.Item, y.Item)); }