#region " © Copyright 2005-07 to Marcos Meli - http://www.marcosmeli.com.ar" // Errors, suggestions, contributions, send a mail to: marcos@filehelpers.com. #endregion using System; namespace FileHelpers { /// Indicates that the engine must ignore commented lines while reading. /// See the Complete Attributes List for more clear info and examples of each one. /// Attributes List /// Quick Start Guide /// Examples of Use [AttributeUsage(AttributeTargets.Class)] public sealed class IgnoreCommentedLinesAttribute : Attribute { internal string mCommentMarker; internal bool mAnyPlace = true; /// Indicates that the engine must ignore commented lines while reading. (The Comment Marker can appear in any place with spaces or tabs at his left) /// The comment marker used to ignore the lines public IgnoreCommentedLinesAttribute(string commentMarker): this(commentMarker, true) { } /// Indicates that the engine must ignore commented lines while reading. /// The comment marker used to ignore the lines /// Indicates if the comment can have spaces or tabs at left (true by default) public IgnoreCommentedLinesAttribute(string commentMarker, bool anyPlace) { if (commentMarker == null || commentMarker.Trim().Length == 0) throw new BadUsageException("The comment string parameter cant be null or empty."); mCommentMarker = commentMarker.Trim(); mAnyPlace = anyPlace; } } }