private static IList <XElement> GetPropertyGroups(XDocument xDocument) { var propertyGroups = ProjectXmlParser.GetPropertyGroups(xDocument)?.ToList(); if (propertyGroups == null || !propertyGroups.Any()) { throw new InvalidDotNetProjectException("Project document contains no PropertyGroup elements."); } return(propertyGroups); }
private static IList <XElement> GetItemGroups(XDocument xDocument) { var itemGroups = ProjectXmlParser.GetItemGroups(xDocument)?.ToList(); return(itemGroups ?? new List <XElement>()); }