public Results <Object> Browse(ResultsSettings settings) { var results = new BrowseResults(ContentDirectory, Id, settings); results.FetchResults(); return(results); }
internal Results <T> Search <T> (string searchCriteria, ResultsSettings settings) where T : Object { if (searchCriteria == null) { throw new ArgumentNullException("searchCriteria"); } var results = new SearchResults <T> (ContentDirectory, Id, searchCriteria, settings); results.FetchResults(); return(results); }
public Results <T> GetChildren <T> (Container container, ResultsSettings settings) { if (container == null) { throw new ArgumentNullException("container"); } uint returned, total, update_id; var xml = controller.Browse(container.Id, BrowseFlag.BrowseDirectChildren, settings.Filter, settings.Offset, settings.RequestCount, settings.SortCriteria, out returned, out total, out update_id); var results = new List <T> ((int)returned); foreach (var result in Deserialize <T> (xml)) { results.Add(result); } return(new BrowseResults <T> (container, settings.SortCriteria, settings.Filter, settings.RequestCount, settings.Offset, total, results)); }
public Results <T> Search <T> (Container container, Action <QueryVisitor> query, ResultsSettings settings) { if (container == null) { throw new ArgumentNullException("container"); } else if (query == null) { throw new ArgumentNullException("query"); } var builder = new StringBuilder(); query(new QueryStringifier(builder)); var search_criteria = builder.ToString(); uint returned, total, update_id; var xml = controller.Search(container.Id, search_criteria, settings.Filter, settings.Offset, settings.RequestCount, settings.SortCriteria, out returned, out total, out update_id); var results = new List <T> ((int)returned); foreach (var result in Deserialize <T> (xml)) { results.Add(result); } return(new SearchResults <T> (container, query, settings.SortCriteria, settings.Filter, settings.RequestCount, settings.Offset, total, results)); }
public BrowseResults(ContentDirectory contentDirectory, string objectId, ResultsSettings settings) : this(contentDirectory, objectId, settings.SortCriteria, settings.Filter, settings.RequestCount, settings.Offset) { }
protected abstract Results <T> GetMoreResults(RemoteContentDirectory contentDirectory, ResultsSettings settings);
public Results <T> SearchForType <T> (ResultsSettings settings) where T : Object { var class_name = ClassManager.GetClassFromType <T> (); return(Search <T> (string.Format(@"upnp:class derivedfrom ""{0}""", class_name), settings)); }
public Results <Object> Search(string searchCriteria, ResultsSettings settings) { return(Search <Object> (searchCriteria, settings)); }