WorkType ParseType(XElement entry) { var term = entry.AtomElement("category").AttributeValue("term"); var verb = entry.ActivityString("verb"); if (term == null && verb == "http://activitystrea.ms/schema/1.0/update") { return(WorkType.Logged); } switch (term) { case "created": return(WorkType.Created); case "started": return(WorkType.Started); case "comment": return(WorkType.Commented); default: return(WorkType.Unknown); } }