/// <summary> /// Add an autocorrection to the autocorrection list. /// </summary> /// <param name="from">word to replace</param> /// <param name="to">what to replace it with</param> public void AutoCorrect(string from, string to) { if (string.IsNullOrWhiteSpace(from)) { throw new ArgumentException(Resources.ArgumentMayNotBeNullOrWhiteSpace, nameof(from)); } if (string.IsNullOrWhiteSpace(to)) { throw new ArgumentException(Resources.ArgumentMayNotBeNullOrWhiteSpace, nameof(to)); } checker.AutoCorrect(from, to); }
/// <summary> /// Causes occurrences of one word to be replaced by another. /// </summary> /// <param name="from">The incorrectly spelled word to be autocorrected.</param> /// <param name="to">The correctly spelled word that should replace from.</param> public void AutoCorrect(string from, string to) => spellChecker.AutoCorrect(from, to);