Example #1
0
 /// <summary>
 /// Returns a list of all comments that belong to this key-value pair at specific INI comment position.
 /// </summary>
 /// <param name="position">The INI comment position.</param>
 /// <returns>List of all commits belonging to this key-value pair in the specified INI comment position.</returns>
 public List <INIComment> GetAllCommentsAtPosition(INICommentPosition position)
 {
     return(attachedComments.FindAll(x => x.Position == position));
 }
Example #2
0
 /// <summary>
 /// Creates a new INI comment.
 /// </summary>
 /// <param name="commentText">Text of the comment.</param>
 /// <param name="position">Position relative to the section or a line it is attached to.</param>
 /// <param name="whiteSpaceCount">Number of whitespace characters between comment and rest of the line.</param>
 public INIComment(string commentText, INICommentPosition position, int whiteSpaceCount)
 {
     CommentText     = commentText;
     Position        = position;
     WhitespaceCount = whiteSpaceCount;
 }
Example #3
0
 /// <summary>
 /// Adds a comment to this key-value pair, created from text and position setting.
 /// </summary>
 /// <param name="commentText">Text of the comment.</param>
 /// <param name="position">Position relative to the key-value pair.</param>
 /// <param name="whiteSpaceCount">Number of whitespace characters between comment and rest of the line.</param>
 public void AddComment(string commentText, INICommentPosition position, int whiteSpaceCount)
 {
     attachedComments.Add(new INIComment(commentText, position, whiteSpaceCount));
 }