Пример #1
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the token substrings.
        /// </summary>
        /// <param name="inventory">The inventory used to parse the tokens.</param>
        /// <param name="tokens">The tokens (runs of text).</param>
        /// ------------------------------------------------------------------------------------
        private List <TextTokenSubstring> GetTokenSubstrings(IScrCheckInventory inventory,
                                                             List <ITextToken> tokens)
        {
            List <TextTokenSubstring> list = inventory.GetReferences(tokens, string.Empty);

            if (m_listValidator != null)
            {
                m_listValidator(list);
            }
            return(list);
        }
Пример #2
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the references.
        /// </summary>
        /// <returns></returns>
        /// ------------------------------------------------------------------------------------
        public List <TextTokenSubstring> GetReferences()
        {
            try
            {
                Assembly           asm  = Assembly.LoadFile(m_scrChecksDllFile);
                Type               type = asm.GetType("SILUBS.ScriptureChecks." + m_scrCheck);
                IScrCheckInventory scrCharInventoryBldr =
                    Activator.CreateInstance(type, this) as IScrCheckInventory;

                return(scrCharInventoryBldr.GetReferences(m_tftList, string.Empty));
            }
            catch
            {
                return(null);
            }
        }
Пример #3
0
        /// ------------------------------------------------------------------------------------
        /// <summary>
        /// Gets the references.
        /// </summary>
        /// <returns></returns>
        /// ------------------------------------------------------------------------------------
        public List <TextTokenSubstring> GetReferences()
        {
            try
            {
                // If this whole valid characters area wasn't such a mess I'd move this bit into a unit
                // testable chunk to make sure the reflection didn't break again. If this breaks again
                // maybe it will encourage us to fix the whole mess. -jn 7/2020
                Assembly           asm  = Assembly.LoadFile(m_scrChecksDllFile);
                Type               type = asm.GetType("SILUBS.ScriptureChecks." + m_scrCheck);
                IScrCheckInventory scrCharInventoryBldr =
                    Activator.CreateInstance(type, this) as IScrCheckInventory;

                return(scrCharInventoryBldr.GetReferences(m_tftList, string.Empty));
            }
            catch
            {
                return(null);
            }
        }
Пример #4
0
		/// ------------------------------------------------------------------------------------
		/// <summary>
		/// Gets the token substrings.
		/// </summary>
		/// <param name="inventory">The inventory used to parse the tokens.</param>
		/// <param name="tokens">The tokens (runs of text).</param>
		/// ------------------------------------------------------------------------------------
		private List<TextTokenSubstring> GetTokenSubstrings(IScrCheckInventory inventory,
			List<ITextToken> tokens)
		{
			List<TextTokenSubstring> list = inventory.GetReferences(tokens, string.Empty);
			if (m_listValidator != null)
				m_listValidator(list);
			return list;
		}