Example #1
0
        public virtual LexAccessApiResult GetLexRecords(string input)
        {
            LexAccessApiResult lexAccessApiResult = new LexAccessApiResult();

            if ((ReferenceEquals(input, null)) || (input.Length == 0))

            {
                return(lexAccessApiResult);
            }

            bool   isEui = CheckFormatEui.IsValidEui(input);
            string text  = "";

            if (isEui == true)

            {
                string lexRecord = DbLexRecord.GetRecordByEui(conn_, lexiconType, input);
                text = lexRecord;
            }
            else

            {
                List <string> euis = DbInflVars.GetUniqueEuisByInflVar(conn_, lexiconType, input);

                List <string> lexRecords = new List <string>();
                foreach (string eui in euis)
                {
                    lexRecords.Add(DbLexRecord.GetRecordByEui(conn_, lexiconType, eui));
                }

                for (int i = 0; i < lexRecords.Count; i++)

                {
                    text = text + lexRecords[i];
                }
            }

            lexAccessApiResult.SetText(text);
            return(lexAccessApiResult);
        }
Example #2
0
        public virtual List <string> GetBasesByEui(string eui)
        {
            List <string> bases = DbInflVars.GetBasesByEui(conn_, lexiconType, eui);

            return(bases);
        }