コード例 #1
0
        public async Task <IList <SearchResult> > SearchAsync(string searchText, int page)
        {
            var api = await apiClientFactory.CreateApiClientAsync();

            var result = await api.SearchWithHttpMessagesAsync(page, searchText);

            return(mapper.MapFrom(result.Body));
        }
コード例 #2
0
        public async Task <IList <SearchResult> > SearchAsync(string searchText, int page)
        {
            var result = await partitionClientFactory.CreatePartitionClient().InvokeWithRetryAsync(async client =>
            {
                var api = await client.CreateApiClient();
                return(await api.SearchWithHttpMessagesAsync(page, searchText));
            });

            return(mapper.MapFrom(result.Body));
        }