private PropertyName UnlikelyGetProperty(LazyStringValue propName) { var propIndex = _docPropNames.Count; propName = _context.GetLazyStringForFieldWithCaching(propName); // PERF: The hash for the property needs to be a hash code, if its not // we will be paying the cost of hash collisions in the sort checks. var prop = new PropertyName(propName.GetHashCode(), propName, -1, propIndex); _docPropNames.Add(prop); _propertiesSortOrder.Add(prop, prop); _propertyNameToId[propName] = prop; _propertiesNeedSorting = true; if (_docPropNames.Count > PropertiesDiscovered + 1) { prop = SwapPropertyIds(prop); } PropertiesDiscovered++; return(prop); }
public override int GetHashCode() { return(_val?.GetHashCode() ?? _decimalVal?.GetHashCode() ?? Inner.GetHashCode()); }