private IPublishedContent ContentForObject(object id) { if (ConvertIdObjectToInt(id, out var intId)) { return(ContentQuery.Content(intId)); } if (ConvertIdObjectToGuid(id, out var guidId)) { return(ContentQuery.Content(guidId)); } if (ConvertIdObjectToUdi(id, out var udiId)) { return(ContentQuery.Content(udiId)); } return(null); }
private IEnumerable <IPublishedContent> ContentForObjects(IEnumerable <object> ids) { var idsA = ids.ToArray(); IEnumerable <int> intIds; if (ConvertIdsObjectToInts(idsA, out intIds)) { return(ContentQuery.Content(intIds)); } IEnumerable <Guid> guidIds; if (ConvertIdsObjectToGuids(idsA, out guidIds)) { return(ContentQuery.Content(guidIds)); } return(Enumerable.Empty <IPublishedContent>()); }
public override void Load() { foreach (DiscretePicasaAlbum album in picasaAlbums) { ContentQuery contentQuery = new ContentQuery(service, album); foreach (GoogleContent content in contentQuery.Content()) { if (content.MimeType.StartsWith("image")) { AddPhoto(new GooglePhoto(content)); } else if (content.MimeType.StartsWith("video")) { AddVideo(new GoogleVideo(content)); } } } }
/// <summary> /// Gets the contents corresponding to the identifiers. /// </summary> /// <param name="ids">The content identifiers.</param> /// <returns>The existing contents corresponding to the identifiers.</returns> /// <remarks>If an identifier does not match an existing content, it will be missing in the returned value.</remarks> public IEnumerable <IPublishedContent> Content(IEnumerable <int> ids) { return(ContentQuery.Content(ids)); }
/// <summary> /// Gets content items from the cache. /// </summary> /// <param name="ids">The keys of the content items.</param> /// <returns>The content items that were found in the cache.</returns> public IEnumerable <IPublishedContent> Content(params Guid[] ids) { return(ContentQuery.Content(ids)); }
public IPublishedContent Content(Udi id) { return(ContentQuery.Content(id)); }