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); } } }
private void ResponseBookmarks(Response Response) { Clients.Caller.response_bookmarks(Response); }
private void Response(Response Response) { Clients.Caller.response(Response); }