SILUBS.ScriptureChecks.MixedCapitalizationCheck.Check C# (CSharp) Method

Check() public method

Execute the check. Call 'RecordError' for every error found.
public Check ( IEnumerable toks, RecordErrorHandler record ) : void
toks IEnumerable ITextTokens corresponding to the text to be checked. /// Typically this is one books worth.
record RecordErrorHandler Call this delegate to report each error found.
return void
		public void Check(IEnumerable<ITextToken> toks, RecordErrorHandler record)
		{
			m_mixedCapitalization = GetReferences(toks, string.Empty);

			string msg = Localize("Word has mixed capitalization");

			foreach (TextTokenSubstring tts in m_mixedCapitalization)
			{
				if (!m_validItemsList.Contains(tts.ToString()))
				{
					tts.Message = msg;
					record(new RecordErrorEventArgs(tts, CheckId));
				}
			}
		}