public SearchMetadata Map(SearchState state) { var hue = _colourProvider .Lookup(new HueKey(state.Swatch, state.Hue)) .ValueOr(()=> _colourProvider.DefaultAccent); return new SearchMetadata(state.Position, state.Text, state.Filter,state.Highlight, state.UseRegEx,state.IgnoreCase, hue, state.Icon); }
public SearchMetadata Map(SearchState state, bool isGlobal = false) { var hue = _colourProvider .Lookup(new HueKey(state.Swatch, state.Hue)) .ValueOr(() => _colourProvider.DefaultAccent); return(new SearchMetadata(state.Position, state.Text, state.Filter, state.Highlight, state.UseRegEx, state.IgnoreCase, hue, state.Icon, isGlobal, state.IsExclusion)); }