Ejemplo n.º 1
0
        protected string UncommentLine(string line)
        {
            var match    = Match.Empty;
            var begining = 0;

            while ((match = CommentRegex.Match(line, begining)).Success)
            {
                begining += match.Length;
            }
            return(line.Substring(begining));
        }
Ejemplo n.º 2
0
 protected string CommentOutLine(string line)
 {
     // if line is already a comment
     if (CommentRegex.Match(line).Success)
     {
         // keep line because it is already a comment
         return(line);
     }
     else
     {
         // comment out line
         return(Comment + line);
     }
 }
Ejemplo n.º 3
0
 private string RemoveComments(string config)
 {
     return(CommentRegex.Replace(config, ""));
 }