Пример #1
0
        ////////////////////////////////////////////////////////////////////////////////////////////////////
        /// \fn private List<TextFragment> CreatePrimitiveTypes(string text)
        ///
        /// \brief Creates primitive types.
        ///
        /// \par Description.
        ///
        /// \par Algorithm.
        ///
        /// \par Usage Notes.
        ///
        /// \author Ilanh
        /// \date 18/10/2017
        ///
        /// \param text  (string) - The text.
        ///
        /// \return The new primitive types.
        ////////////////////////////////////////////////////////////////////////////////////////////////////

        private List <TextFragment> CreatePrimitiveTypes(string text)
        {
            List <Type>      types        = TypesUtility.GetPrimitiveTypes();
            HashSet <string> typesStrings = new HashSet <string>();

            types.ForEach(t => typesStrings.Add(t.ToString()));
            string tokensString = CreateTokensString(typesStrings);

            return(CreateMatchList(text, tokensString, Brushes.Red));
        }