public BCFComment(XElement node) { this.Guid = (System.Guid?)node.Attribute("Guid") ?? System.Guid.Empty; Status = (String)node.Element("Status") ?? "-"; Date = (DateTime?)node.Element("Date") ?? DateTime.MinValue; Author = (String)node.Element("Author") ?? "-"; Comment = (String)node.Element("Comment") ?? "-"; ModifiedDate = (DateTime?)node.Element("ModifiedDate") ?? null; ModifiedAuthor = (String)node.Element("ModifiedAuthor") ?? "-"; VerbalStatus = (String)node.Element("VerbalStatus") ?? ""; Topic = new AttrIDNode(node.Element("Topic")); var reply = node.Elements("ReplyToComment").FirstOrDefault(); if (reply != null) { ReplyToComment = new AttrIDNode(node.Element("ReplyToComment")); } var viewp = node.Elements("Viewpoint").FirstOrDefault(); if (viewp != null) { Viewpoint = new AttrIDNode(node.Element("Viewpoint")); } }
public BCFComment(Guid id, Guid topicId, String status, DateTime date, String author, String comment) { Status = status; Date = date; Author = author; Comment = comment ?? "-"; Guid = id; Topic = new AttrIDNode(topicId); }
public BCFComment(XElement node) { this.Guid = (System.Guid?)node.Attribute("Guid") ?? System.Guid.Empty; Status = (String)node.Element("Status") ?? ""; Date = (DateTime?)node.Element("Date") ?? DateTime.MinValue; Author = (String)node.Element("Author") ?? ""; Comment = (String)node.Element("Comment") ?? ""; ModifiedDate = (DateTime?)node.Element("ModifiedDate") ?? null; ModifiedAuthor = (String)node.Element("ModifiedAuthor") ?? ""; VerbalStatus = (String)node.Element("VerbalStatus") ?? ""; Topic = new AttrIDNode(node.Element("Topic")); var reply = node.Elements("ReplyToComment").FirstOrDefault(); if (reply != null) { ReplyToComment = new AttrIDNode(node.Element("ReplyToComment")); } var viewp = node.Elements("Viewpoint").FirstOrDefault(); if (viewp != null) { Viewpoint = new AttrIDNode(node.Element("Viewpoint")); } }
public BCFComment(Guid id, Guid topicId, String status, DateTime date, String author, String comment) { Status = status; Date = date; Author = author; Comment = comment; Guid = id; Topic = new AttrIDNode(topicId); }