public FacetValue Get(FacetAggregationField field) { if (_legacy) { return(_values[Default]); } return(_values[field]); }
public void Add(FacetAggregationField field, string range) { if (_legacy) { if (Any) { return; } AddDefault(range); return; } Any = true; _values[field] = new FacetValue { Range = range, Name = string.IsNullOrWhiteSpace(field.DisplayName) ? field.Name : field.DisplayName }; }
protected bool Equals(FacetAggregationField other) { return(Name == other.Name && DisplayName == other.DisplayName); }