SILUBS.ScriptureChecks.CapitalizationProcessor.CheckForCharStyleCapilizationError C# (CSharp) Method

CheckForCharStyleCapilizationError() private method

Creates a checking error if character style requires an initial uppercase letter, but the tssFirstLetter is lowercase.
private CheckForCharStyleCapilizationError ( ITextToken tok, TextTokenSubstring ttsFirstLetter, List result ) : bool
tok ITextToken The Scripture token.
ttsFirstLetter SILUBS.SharedScrUtils.TextTokenSubstring The token substring of the first word-forming character /// in the given token.
result List The result.
return bool
		private bool CheckForCharStyleCapilizationError(ITextToken tok,
			TextTokenSubstring ttsFirstLetter, List<TextTokenSubstring> result)
		{
			if (m_foundCharacterText)
				return false;

			m_foundCharacterText = true;

			// The first word-forming character of the character style is lowercase.
			// Look it up in the capitalized styles dictionary to determine if it should be uppercase.
			StyleCapInfo styleCapInfo;
			if (m_allCapitalizedStyles.TryGetValue(m_characterStyle, out styleCapInfo) &&
				styleCapInfo.m_type == StyleInfo.StyleTypes.character)
			{
				ttsFirstLetter.InventoryText = m_characterStyle;
				ttsFirstLetter.Message = CapitalizationCheck.GetErrorMessage(m_checksDataSource,
					styleCapInfo.m_capCheck, m_characterStyle);
				result.Add(ttsFirstLetter);
				return true;
			}
			return false;
		}