System.ServiceModel.Syndication.SyndicationFeedExtensions.GetEditLink C# (CSharp) Метод

GetEditLink() публичный статический Метод

public static GetEditLink ( this item, bool throwIfNotPresent ) : System.ServiceModel.Syndication.SyndicationLink
item this
throwIfNotPresent bool
Результат System.ServiceModel.Syndication.SyndicationLink
        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;
        }