Esempio n. 1
0
        public static bool TranslateInfo(BlockMInfo blockMInfo, string info)
        {
            var dic = new SearchInfosDictionary();

            if (dic.Search(info) == false)
            {
                return(false);
            }


            blockMInfo.Name       = dic.Output;
            blockMInfo.Attributes = new List <string>();
            return(true);
        }
Esempio n. 2
0
        public static void TranslateName(BlockMInfo blockMInfo, string name)
        {
            var dic = new SearchNamesDictionary();

            if (dic.Search(name) == false)
            {
                blockMInfo.IsMismatched = true;
            }

            else
            {
                blockMInfo.Name = dic.Output;
            }
        }
Esempio n. 3
0
        public static void TranslateAttributes(BlockMInfo blockMInfo, List <string> attriubtes)
        {
            var dic = new SearchAttributesDictionary();
            var translatedAttributes = new List <string>();

            foreach (var item in attriubtes)
            {
                if (dic.Search(item) == false)
                {
                    blockMInfo.IsMismatched = true;
                    return;
                }
                else
                {
                    translatedAttributes.Add(dic.Output);
                }
            }
            blockMInfo.Attributes = translatedAttributes;
        }