public bool AddWords(IEnumerable <KeyValuePair <string, string> > keyValuePairs) { var words = keyValuePairs?.Select(x => new StringEntry <string>(x.Key, x.Value)); if (words == null) { return(false); } CurrentSuggestions.AddWords(words); BaseSuggestions.AddWords(words); return(true); }
private void CreateInitialSuggestions() { var words = Words.LoadWords()?.Select(x => new StringEntry <string>(x, x)); if (words != null) { BaseSuggestions.AddWords(words); BaseSuggestions.AddWords(new[] { new StringEntry <string>("nats ℕ", "nats ℕ"), new StringEntry <string>("rats ℚ", "rats ℚ"), new StringEntry <string>("reals ℝ", "reals ℝ"), new StringEntry <string>("isin ∊", "isin ∊"), new StringEntry <string>("notin ∉", "notin ∉"), new StringEntry <string>("delta ∆", "delta ∆"), new StringEntry <string>("prod ×", "prod ×"), new StringEntry <string>("empty Ø", "empty Ø"), new StringEntry <string>("ints ℤ", "ints ℤ"), new StringEntry <string>("set { ... | ... }", "set { ... | ... }"), }); CurrentSuggestions = BaseSuggestions.Copy(); } }