/// <summary>
 /// Search for Content
 /// </summary>
 /// <param name="parameters"></param>
 /// <returns></returns>
 public ContentSearchResponse ContentSearch(ContentSearchParameters parameters)
 {
     var query = GetQueryTranslator().Translate(parameters);
     var xml = _service.LoadContent(query);
     var results = new ObjectDeserializer().Deserialize<ContentSearchResponse>(xml);
     return results;
 }
        public void ContentSearchASync(ContentSearchParameters parameters, ContentSearchCallback callback)
        {
            var query = GetQueryTranslator().Translate(parameters);
            var dlgt = new LoadJsonDelegate(_service.LoadContent);

            dlgt.BeginInvoke(query,
                ContentSearchAsyncCallback,
                new AsyncSearchCallbackParameter { Delegate = dlgt, CallbackFunction = callback });
        }
        protected static void SearchWithFilters()
        {
            //A content search with filters
            var op = new OpenPlatformSearch();
            var parameters = new ContentSearchParameters
                                 {
                                     Query = "prince",
                                     Count = 20,
                                     Filters = new List<string>{"music"}
                                 };

            var results = op.Search(parameters);

            Console.WriteLine("Number of results: " + results.Count);
            foreach (var item in results.Results)
            {
                Console.WriteLine(item.Headline);
            }
        }
 public ActionResult Results(ContentSearchParameters parameters)
 {
     OpenPlatformSearch op = new OpenPlatformSearch();
     var results = op.Search(parameters);
     return View(results);
 }