Example #1
0
        public override object CreateInstance()
        {
            RegexFileScanner rs = (RegexFileScanner)base.CreateInstance();

            rs.AddExcludeRegex("<!--(?:.|\n)*?-->", null);
            return(rs);
        }
		public override object CreateInstance ()
		{
			RegexFileScanner rs = new RegexFileScanner (extensions, mimeTypes);
			foreach (ExtensionNode node in ChildNodes) {
				if (node is IncludeExtensionNode) {
					IncludeExtensionNode rn = (IncludeExtensionNode) node;
					rs.AddIncludeRegex (rn.RegexValue, rn.Group, rn.PluralGroup, rn.RegexOptions, rn.EscapeMode);
				}
				else if (node is ExcludeExtensionNode) {
					ExcludeExtensionNode rn = (ExcludeExtensionNode) node;
					rs.AddExcludeRegex (rn.RegexValue, rn.RegexOptions);
				}
				else if (node is TransformExtensionNode) {
					TransformExtensionNode rn = (TransformExtensionNode) node;
					rs.AddTransformRegex (rn.RegexValue, rn.ReplaceValue, rn.RegexOptions);
				}
			}
			return rs;
		}
        public override object CreateInstance()
        {
            RegexFileScanner rs = new RegexFileScanner(extensions, mimeTypes);

            foreach (ExtensionNode node in ChildNodes)
            {
                if (node is IncludeExtensionNode)
                {
                    IncludeExtensionNode rn = (IncludeExtensionNode)node;
                    rs.AddIncludeRegex(rn.RegexValue, rn.Group, rn.PluralGroup, rn.RegexOptions, rn.EscapeMode);
                }
                else if (node is ExcludeExtensionNode)
                {
                    ExcludeExtensionNode rn = (ExcludeExtensionNode)node;
                    rs.AddExcludeRegex(rn.RegexValue, rn.RegexOptions);
                }
                else if (node is TransformExtensionNode)
                {
                    TransformExtensionNode rn = (TransformExtensionNode)node;
                    rs.AddTransformRegex(rn.RegexValue, rn.ReplaceValue, rn.RegexOptions);
                }
            }
            return(rs);
        }