public static SyndicationLink GetEditLink(this SyndicationItem item, bool throwIfNotPresent) { if (item == null) { throw new ArgumentNullException("item"); } SyndicationLink editLink = item.Links.Where((link) =>(link.RelationshipType == "edit")).SingleOrDefault(); if (editLink == null && throwIfNotPresent) { throw new ArgumentException("The item does not have an edit link"); } return editLink; }