public CommentObject Clone() { CommentObject newCom = new CommentObject(); newCom.PreceedingComments.AddRange(PreceedingComments); newCom.TrailingComment = TrailingComment; return newCom; }
public CommentObject Clone() { CommentObject newCom = new CommentObject(); newCom.PreceedingComments.AddRange(PreceedingComments); newCom.TrailingComment = TrailingComment; return(newCom); }
public bool IsTheSame(CommentObject comments) { if (comments == null) return false; if (Utility.StringCollectionsAreTheSame(PreceedingComments, comments.PreceedingComments) == false) { return false; } if (Equals(TrailingComment, comments.TrailingComment) == false) { return false; } return true; }
public bool IsTheSame(CommentObject comments) { if (comments == null) { return(false); } if (Utility.StringCollectionsAreTheSame(PreceedingComments, comments.PreceedingComments) == false) { return(false); } if (Equals(TrailingComment, comments.TrailingComment) == false) { return(false); } return(true); }
private void SetTrailingComment(KeyValuePair<int, Comment> comment, CommentObject commentObject) { string newComment = Helper.StandardizeLineBreaks(comment.Value.Text.Trim(), Environment.NewLine); if (formatSettings.CommentLinesAsCommentBlock) { newComment = "/* " + newComment.Replace("/*", "").Replace("*/", "").Replace("//", "").Trim() + " */"; } string currentComment = commentObject.TrailingComment; if (string.IsNullOrEmpty(currentComment) == false) { commentObject.TrailingComment += Environment.NewLine + newComment; } else { commentObject.TrailingComment = newComment; } }