Exemplo n.º 1
0
 public SearchNodeRequestHandler(NodeRequest request,
                                 NodeConnection current,
                                 ILoadChatsService loadChatsService,
                                 ILoadUsersService loadUsersService,
                                 ILoadChannelsService loadChannelsService,
                                 IPrivacyService privacyService)
 {
     this.request             = (SearchNodeRequest)request;
     this.current             = current;
     this.loadChatsService    = loadChatsService;
     this.loadUsersService    = loadUsersService;
     this.loadChannelsService = loadChannelsService;
     this.privacyService      = privacyService;
 }
Exemplo n.º 2
0
        public async Task <SearchNodeResponse> GetSearchResponseAsync(string searchQuery, long?navigationUserId, bool?direction, List <SearchType> searchTypes, long?requestorId, NodeConnection node)
        {
            try
            {
                SearchNodeRequest request = new SearchNodeRequest(searchQuery, navigationUserId, direction, searchTypes, requestorId);
                SendRequest(node, request);
                SearchNodeResponse response = (SearchNodeResponse) await GetResponseAsync(request, 5 * 1000).ConfigureAwait(false);

                return(response);
            }
            catch
            {
                return(null);
            }
        }