private static string GetUriFromLinkRelation(Linkable sourceModel, string linkRel) { string uri = LinkRelations.FindLinkAsString(sourceModel.Links, linkRel); if (uri != null && uri.Contains("{")) { uri = uri.Substring(0, uri.IndexOf("{")); } return(uri); }
/// <summary> /// /// </summary> /// <typeparam name="T"></typeparam> /// <param name="feed"></param> /// <param name="title"></param> /// <returns></returns> public static string FindEntryHref <T>(Feed <T> feed, string title) { string href = null; List <Entry <T> > entries = feed.Entries; if (entries != null) { foreach (Entry <T> entry in entries) { if (title.Equals(entry.Title) && entry.Content is OutlineAtomContent) { OutlineAtomContent ct = entry.Content as OutlineAtomContent; href = ct.Src; if (href == null) { href = LinkRelations.FindLinkAsString(entry.Links, LinkRelations.SELF.Rel); } break; } } } return(href); }