Ejemplo n.º 1
0
        private IDictionary <int, string> GetResultDic(IEnumerable <int> SearchResult, bool Sorted = false)
        {
            IDictionary <int, string> ResultDic;

            if (Sorted)
            {
                ResultDic = new SortedDictionary <int, string>();
            }
            else
            {
                ResultDic = new Dictionary <int, string>();
            }
            if (SearchResult != null)
            {
                foreach (var id in SearchResult)
                {
                    string fileUrl = string.Empty;
                    if (FileManager.docsIds.TryGetValue(id, out fileUrl))
                    {
                        ResultDic.Add(id, fileUrl);
                    }
                }
            }
            return(ResultDic);
        }
Ejemplo n.º 2
0
        public static string GetDescriptionByResult(int code)
        {
            var result = string.Empty;

            if (ResultDic.ContainsKey(code))
            {
                result = ResultDic[code];
            }

            return(result);
        }