Exemplo n.º 1
0
        private ISource Wrap(ISource source)
        {
            ISource newSource = source;

            if (ignoreWhitespace)
            {
                newSource = new WhitespaceStrippedSource(newSource);
            }
            if (normalizeWhitespace)
            {
                newSource = new WhitespaceNormalizedSource(newSource);
            }
            if (ignoreComments)
            {
                newSource = new CommentLessSource(newSource);
            }
            return(newSource);
        }
Exemplo n.º 2
0
        private ISource Wrap(ISource source)
        {
            ISource newSource = source;

            if (ignoreWhitespace)
            {
                newSource = new WhitespaceStrippedSource(newSource);
            }
            if (normalizeWhitespace)
            {
                newSource = new WhitespaceNormalizedSource(newSource);
            }
            if (ignoreComments)
            {
                newSource = ignoreCommentVersion == null
                    ? new CommentLessSource(newSource)
                    : new CommentLessSource(newSource, ignoreCommentVersion);
            }
            if (ignoreECW)
            {
                newSource = new ElementContentWhitespaceStrippedSource(newSource);
            }
            return(newSource);
        }