public RegexCodeSanitizerDecorator(string pattern, bool isMultiline, CodeSanitizerBase parentCodeSanitizer)
            : base(parentCodeSanitizer)
        {
            var mode = isMultiline ? RegexOptions.Multiline : RegexOptions.Singleline;

            this.expression  = new Regex(pattern, mode);
            this.isMultiline = isMultiline;
        }
Exemple #2
0
 public CStyleCommentSanitizerDecorator(CodeSanitizerBase parent)
     : base(parent)
 {
 }
 public WhiteSpaceSanitizerDecorator(CodeSanitizerBase parent)
     : base(@"^\s+$[\r\n]*", true, parent)
 {
 }
Exemple #4
0
 public CodeSanitizerDecoratorBase(CodeSanitizerBase parentSanitizer)
 {
     this.parentSanitizer = parentSanitizer;
 }
 public CompilerDirectiveSanitizerDecorator(CodeSanitizerBase parent)
     : base(@"^\s*\#(.*?)$[\r\n]*", true, parent)
 {
 }
 public UsingSanitizerDecorator(CodeSanitizerBase parent)
     : base(@"^(using) [A-Za-z\.]*;[\r\n]*", true, parent)
 {
 }