コード例 #1
0
        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);
        }
コード例 #2
0
        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));
        }