Exemple #1
0
        public void SearchAll(string query, Index.Target Target)
        {
            List<UserObject> Users = SearchUsers(query);
            foreach (UserObject item in Users)
            {
                List<ComputerObject> CompsUser = SearchComputer(item.Name, "description");
                Response Rs = new Response(item, CompsUser);
                Target(Rs);
            }

            List<ComputerObject> Comps = SearchComputer(query, "name");
            foreach (ComputerObject item in Comps)
            {
                string pattern = @"([А-ЯЁ][а-яё]+[\-\s]?){3,}";

                Regex regex = new Regex(pattern);
                Match match = regex.Match(item.Description);
                if (match.Success)
                {
                    List<UserObject> UsersComp = SearchUsers(match.Value.Trim());
                    Response Rs = new Response(item, UsersComp);
                    Target(Rs);
                }
            }
        }
Exemple #2
0
 private void ResponseBookmarks(Response Response)
 {
     Clients.Caller.response_bookmarks(Response);
 }
Exemple #3
0
 private void Response(Response Response)
 {
     Clients.Caller.response(Response);
 }