private static List<Document> CallEventSearchService(EventsSearchRequest request)
        {
            IServiceRequest client = ServiceRequestFactory.GetProxy(SERVICES.GLOBALSEARCH_SERVICE);
            List<Document> results = new List<Document>();
            EventsSearchResponse response = null;

            try
            {
                response = client.Request<EventsSearchRequest, EventsSearchResponse>(request);
                results = response.Results;
            }
            catch (Exception searchException)
            {
                Sitecore.Diagnostics.Log.Error("Error executing event search request", searchException, typeof(EventHelper));
            }

            return results;
        }
Beispiel #2
0
 /// <summary>
 /// 获取联动事件列表
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public Task <EventsSearchResponse> EventsSearchAsync(EventsSearchRequest model)
 {
     return(_hikVisionApiManager.PostAndGetAsync <EventsSearchRequest, EventsSearchResponse>("/api/eventService/v1/events/search", model, Const.V1_3));
 }