SILUBS.ScriptureChecks.CharactersCheck.InventoryTokens C# (CSharp) Method

InventoryTokens() public method

Creates an inventory of the tokens.
public InventoryTokens ( int bookNum, TextInventory inventory, IEnumerable tokens ) : void
bookNum int The book number.
inventory TextInventory The inventory.
tokens IEnumerable The tokens.
return void
		public void InventoryTokens(int bookNum, TextInventory inventory,
			IEnumerable<ITextToken> tokens)
		{
			foreach (ITextToken tok in tokens)
			{
				foreach (string key in ParseCharacterSequences(tok.Text))
				{
					// Don't inventory spaces, lf, cr.
					if (key == " " || key == "\r" || key == "\n")
						continue;

					inventory.GetValue(key).AddReference(bookNum);
				}
			}
		}
	}