/// <inheritdoc /> public void SetValue(IPropertyValue propertyValue) { propertyValue.AssertArgumentNotNull(nameof(propertyValue)); bool isSet = false; for (int i = 0; i < _propertyValues.Count; i++) { var existingPropertyValue = _propertyValues[i]; if (_searchOptions.PropertyComparer.Equals(existingPropertyValue.PropertyUntyped, propertyValue.PropertyUntyped)) { // replaces existing _propertyValues[i] = propertyValue; isSet = true; break; } } if (!isSet) { _propertyValues.Add(propertyValue); } }
/// <inheritdoc /> public void Add(IPropertyValue propertyValue) { propertyValue.AssertArgumentNotNull(nameof(propertyValue)); _propertyValues.Add(propertyValue); }