using System; using System.Linq; using System.Collections.Generic; using System.Text; using System.Windows; namespace DBToolControls { public class Syntax { private List wordsToFormat = new List(); private bool isCaseSensitive; private Dictionary propertyValues = new Dictionary(); internal Dictionary PropertyValues { get { return propertyValues; } } public Syntax(bool caseSensitive) { this.isCaseSensitive = caseSensitive; } internal bool Contains(string s) { return wordsToFormat.Contains(isCaseSensitive ? s : s.ToLower()); } public void AddWords(params string[] words) { wordsToFormat.AddRange(isCaseSensitive ? words : words.Select(w => w.ToLower())); } public void AddFormatting(DependencyProperty dp, object value) { propertyValues.Add(dp, value); } } }