SILUBS.ScriptureChecks.ProcessPunctationTokens.AdvancedFinalize C# (CSharp) Method

AdvancedFinalize() private method

Treat each punctuation and whitespace sequence as a single string. It is called advanced since many more inventory items for the user to look at, and only advanced users (we hope) will look at these results.
private AdvancedFinalize ( PunctuationToken pTok, string desiredKey, List result ) : void
pTok PunctuationToken The current punctuation token, whose TextToken substring is /// modified to indicate a pattern of multiple punctuation characters
desiredKey string If specified, indicates a specific punctuation pattern to /// seek (all others will be discarded); To retrieve all punctation substrings, specify /// the empty string.
result List List of TextTokenSubstring items that will be added to
return void
		private void AdvancedFinalize(PunctuationToken pTok, string desiredKey,
			List<TextTokenSubstring> result)
		{
			// concatanate all the punctuation sequences into one string
			string pattern = String.Empty;
			foreach (PunctuationToken pTok2 in m_puncts)
			{
				//System.Diagnostics.Debug.Assert(pTok2.Tts == null || pTok2.Tts.Token == pTok.Tts.Token);
				pattern += pTok2.ToString();
			}
			pTok.Tts.InventoryText = pattern;

			if (desiredKey == String.Empty || desiredKey == pTok.Tts.InventoryText)
				result.Add(pTok.Tts);
		}