/// <summary> /// returns the resumabled create media Uri for a given entry /// </summary> /// <param name="entry"></param> /// <returns></returns> public static Uri GetResumableCreateUri(AtomLinkCollection links) { // scan the link collection AtomLink link = links.FindService(CreateMediaRelation, null); return(link == null ? null : new Uri(link.AbsoluteUri)); }
public static string GetHrefContent(this AtomLinkCollection links, LinkType feedType = LinkType.listfeed) { foreach (var link in links) { if (link.Rel.EndsLike(feedType.ToString())) { return(link.HRef.Content); } } return(null); }
private string GetPostLinkManually(AtomLinkCollection links) { foreach (AtomLink link in links) { if (link.Rel.CompareTo("alternate") == 0) { return(link.HRef.Content); } } return(""); }
private string GetEventFeedRel(AtomLinkCollection collection) { foreach (AtomLink link in collection) { if (link.Rel == EventFeedRel) { return(link.AbsoluteUri); } } return(null); }
///////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////// /// <summary>verifies the categroy collection</summary> /// <param name="theOne">the One Collection </param> /// <param name="theOther">the Other Collection </param> /// <returns>true if identical </returns> ////////////////////////////////////////////////////////////////////// public static bool IsLinkCollectionIdentical(AtomLinkCollection theOne, AtomLinkCollection theOther) { if (theOne == null && theOther == null) { return(true); } if (theOne.Count != theOther.Count) { return(false); } for (int i = 0; i < theOne.Count; i++) { if (!IsLinkIdentical(theOne[i], theOther[i])) { return(false); } } return(true); }
/// <summary> /// returns the resumabled create media Uri for a given entry /// </summary> /// <param name="entry"></param> /// <returns></returns> public static Uri GetResumableCreateUri(AtomLinkCollection links) { // scan the link collection AtomLink link = links.FindService(CreateMediaRelation, null); return link == null ? null : new Uri(link.AbsoluteUri); }
public void Init() { links = new AtomLinkCollection(); fistLink = new AtomLink(); secondLink = new AtomLink(); }
public void Init() { links = new AtomLinkCollection(); fistLink = new AtomLink(new Uri("http://purl.org/atom/ns#")); secondLink = new AtomLink(new Uri("http://purl.org/atom/ns#")); }