C# Class ZetaHtmlCompressor.HtmlCompressor

Inheritance: ICompressor
Exibir arquivo Open project: pauljz/pvc-htmlcompressor Class Usage Examples

Public Properties

Property Type Description
ALL_TAGS string
BLOCK_TAGS_MAX string
BLOCK_TAGS_MIN string
PHP_TAG_PATTERN System.Text.RegularExpressions.Regex
SERVER_SCRIPT_TAG_PATTERN System.Text.RegularExpressions.Regex
SERVER_SIDE_INCLUDE_PATTERN System.Text.RegularExpressions.Regex

Public Methods

Method Description
compress ( string html ) : string
getCssCompressor ( ) : ICompressor
getJavaScriptCompressor ( ) : ICompressor
getPreservePatterns ( ) : List
getRemoveSurroundingSpaces ( ) : string
getStatistics ( ) : HtmlCompressorStatistics
isCompressCss ( ) : bool
isCompressJavaScript ( ) : bool
isEnabled ( ) : bool
isGenerateStatistics ( ) : bool
isPreserveLineBreaks ( ) : bool
isRemoveComments ( ) : bool
isRemoveFormAttributes ( ) : bool
isRemoveHttpProtocol ( ) : bool
isRemoveHttpsProtocol ( ) : bool
isRemoveInputAttributes ( ) : bool
isRemoveIntertagSpaces ( ) : bool
isRemoveJavaScriptProtocol ( ) : bool
isRemoveLinkAttributes ( ) : bool
isRemoveMultiSpaces ( ) : bool
isRemoveQuotes ( ) : bool
isRemoveScriptAttributes ( ) : bool
isRemoveStyleAttributes ( ) : bool
isSimpleBooleanAttributes ( ) : bool
isSimpleDoctype ( ) : bool
setCompressCss ( bool compressCss ) : void
setCompressJavaScript ( bool compressJavaScript ) : void
setCssCompressor ( ICompressor cssCompressor ) : void
setEnabled ( bool enabled ) : void
setGenerateStatistics ( bool generateStatistics ) : void
setJavaScriptCompressor ( ICompressor javaScriptCompressor ) : void
setPreserveLineBreaks ( bool preserveLineBreaks ) : void
setPreservePatterns ( List preservePatterns ) : void
setRemoveComments ( bool removeComments ) : void
setRemoveFormAttributes ( bool removeFormAttributes ) : void
setRemoveHttpProtocol ( bool removeHttpProtocol ) : void
setRemoveHttpsProtocol ( bool removeHttpsProtocol ) : void
setRemoveInputAttributes ( bool removeInputAttributes ) : void
setRemoveIntertagSpaces ( bool removeIntertagSpaces ) : void
setRemoveJavaScriptProtocol ( bool removeJavaScriptProtocol ) : void
setRemoveLinkAttributes ( bool removeLinkAttributes ) : void
setRemoveMultiSpaces ( bool removeMultiSpaces ) : void
setRemoveQuotes ( bool removeQuotes ) : void
setRemoveScriptAttributes ( bool removeScriptAttributes ) : void
setRemoveStyleAttributes ( bool removeStyleAttributes ) : void
setRemoveSurroundingSpaces ( string tagList ) : void
setSimpleBooleanAttributes ( bool simpleBooleanAttributes ) : void
setSimpleDoctype ( bool simpleDoctype ) : void

Private Methods

Method Description
compressCssStyles ( string source ) : string
compressJavaScript ( string source ) : string
createCompressorClone ( ) : HtmlCompressor
endStatistics ( string html ) : void
initStatistics ( string html ) : void
matches ( Regex regex, string value ) : bool
preserveBlocks ( string html, List preBlocks, List taBlocks, List scriptBlocks, List styleBlocks, List eventBlocks, List condCommentBlocks, List skipBlocks, List lineBreakBlocks, List userBlocks ) : string
processCondCommentBlocks ( List condCommentBlocks ) : void
processEventBlocks ( List eventBlocks ) : void
processHtml ( string html ) : string
processLineBreakBlocks ( List lineBreakBlocks ) : void
processPreBlocks ( List preBlocks ) : void
processPreservedBlocks ( List preBlocks, List taBlocks, List scriptBlocks, List styleBlocks, List eventBlocks, List condCommentBlocks, List skipBlocks, List lineBreakBlocks, List userBlocks ) : void
processScriptBlocks ( List scriptBlocks ) : void
processSkipBlocks ( List skipBlocks ) : void
processStyleBlocks ( List styleBlocks ) : void
processTextAreaBlocks ( List taBlocks ) : void
processUserBlocks ( List userBlocks ) : void
removeComments ( string html ) : string
removeFormAttributes ( string html ) : string
removeHttpProtocol ( string html ) : string
removeHttpsProtocol ( string html ) : string
removeInputAttributes ( string html ) : string
removeIntertagSpaces ( string html ) : string
removeJavaScriptProtocol ( string source ) : string
removeLinkAttributes ( string html ) : string
removeMultiSpaces ( string html ) : string
removeQuotesInsideTags ( string html ) : string
removeScriptAttributes ( string html ) : string
removeSpacesInsideTags ( string html ) : string
removeStyleAttributes ( string html ) : string
removeSurroundingSpaces ( string html ) : string
returnBlocks ( string html, List preBlocks, List taBlocks, List scriptBlocks, List styleBlocks, List eventBlocks, List condCommentBlocks, List skipBlocks, List lineBreakBlocks, List userBlocks ) : string
simpleBooleanAttributes ( string html ) : string
simpleDoctype ( string html ) : string

Method Details

compress() public method

public compress ( string html ) : string
html string
return string

getCssCompressor() public method

public getCssCompressor ( ) : ICompressor
return ICompressor

getJavaScriptCompressor() public method

public getJavaScriptCompressor ( ) : ICompressor
return ICompressor

getPreservePatterns() public method

public getPreservePatterns ( ) : List
return List

getRemoveSurroundingSpaces() public method

public getRemoveSurroundingSpaces ( ) : string
return string

getStatistics() public method

public getStatistics ( ) : HtmlCompressorStatistics
return HtmlCompressorStatistics

isCompressCss() public method

public isCompressCss ( ) : bool
return bool

isCompressJavaScript() public method

public isCompressJavaScript ( ) : bool
return bool

isEnabled() public method

public isEnabled ( ) : bool
return bool

isGenerateStatistics() public method

public isGenerateStatistics ( ) : bool
return bool

isPreserveLineBreaks() public method

public isPreserveLineBreaks ( ) : bool
return bool

isRemoveComments() public method

public isRemoveComments ( ) : bool
return bool

isRemoveFormAttributes() public method

public isRemoveFormAttributes ( ) : bool
return bool

isRemoveHttpProtocol() public method

public isRemoveHttpProtocol ( ) : bool
return bool

isRemoveHttpsProtocol() public method

public isRemoveHttpsProtocol ( ) : bool
return bool

isRemoveInputAttributes() public method

public isRemoveInputAttributes ( ) : bool
return bool

isRemoveIntertagSpaces() public method

public isRemoveIntertagSpaces ( ) : bool
return bool

isRemoveJavaScriptProtocol() public method

public isRemoveJavaScriptProtocol ( ) : bool
return bool

isRemoveLinkAttributes() public method

public isRemoveLinkAttributes ( ) : bool
return bool

isRemoveMultiSpaces() public method

public isRemoveMultiSpaces ( ) : bool
return bool

isRemoveQuotes() public method

public isRemoveQuotes ( ) : bool
return bool

isRemoveScriptAttributes() public method

public isRemoveScriptAttributes ( ) : bool
return bool

isRemoveStyleAttributes() public method

public isRemoveStyleAttributes ( ) : bool
return bool

isSimpleBooleanAttributes() public method

public isSimpleBooleanAttributes ( ) : bool
return bool

isSimpleDoctype() public method

public isSimpleDoctype ( ) : bool
return bool

setCompressCss() public method

public setCompressCss ( bool compressCss ) : void
compressCss bool
return void

setCompressJavaScript() public method

public setCompressJavaScript ( bool compressJavaScript ) : void
compressJavaScript bool
return void

setCssCompressor() public method

public setCssCompressor ( ICompressor cssCompressor ) : void
cssCompressor ICompressor
return void

setEnabled() public method

public setEnabled ( bool enabled ) : void
enabled bool
return void

setGenerateStatistics() public method

public setGenerateStatistics ( bool generateStatistics ) : void
generateStatistics bool
return void

setJavaScriptCompressor() public method

public setJavaScriptCompressor ( ICompressor javaScriptCompressor ) : void
javaScriptCompressor ICompressor
return void

setPreserveLineBreaks() public method

public setPreserveLineBreaks ( bool preserveLineBreaks ) : void
preserveLineBreaks bool
return void

setPreservePatterns() public method

public setPreservePatterns ( List preservePatterns ) : void
preservePatterns List
return void

setRemoveComments() public method

public setRemoveComments ( bool removeComments ) : void
removeComments bool
return void

setRemoveFormAttributes() public method

public setRemoveFormAttributes ( bool removeFormAttributes ) : void
removeFormAttributes bool
return void

setRemoveHttpProtocol() public method

public setRemoveHttpProtocol ( bool removeHttpProtocol ) : void
removeHttpProtocol bool
return void

setRemoveHttpsProtocol() public method

public setRemoveHttpsProtocol ( bool removeHttpsProtocol ) : void
removeHttpsProtocol bool
return void

setRemoveInputAttributes() public method

public setRemoveInputAttributes ( bool removeInputAttributes ) : void
removeInputAttributes bool
return void

setRemoveIntertagSpaces() public method

public setRemoveIntertagSpaces ( bool removeIntertagSpaces ) : void
removeIntertagSpaces bool
return void

setRemoveJavaScriptProtocol() public method

public setRemoveJavaScriptProtocol ( bool removeJavaScriptProtocol ) : void
removeJavaScriptProtocol bool
return void

setRemoveLinkAttributes() public method

public setRemoveLinkAttributes ( bool removeLinkAttributes ) : void
removeLinkAttributes bool
return void

setRemoveMultiSpaces() public method

public setRemoveMultiSpaces ( bool removeMultiSpaces ) : void
removeMultiSpaces bool
return void

setRemoveQuotes() public method

public setRemoveQuotes ( bool removeQuotes ) : void
removeQuotes bool
return void

setRemoveScriptAttributes() public method

public setRemoveScriptAttributes ( bool removeScriptAttributes ) : void
removeScriptAttributes bool
return void

setRemoveStyleAttributes() public method

public setRemoveStyleAttributes ( bool removeStyleAttributes ) : void
removeStyleAttributes bool
return void

setRemoveSurroundingSpaces() public method

public setRemoveSurroundingSpaces ( string tagList ) : void
tagList string
return void

setSimpleBooleanAttributes() public method

public setSimpleBooleanAttributes ( bool simpleBooleanAttributes ) : void
simpleBooleanAttributes bool
return void

setSimpleDoctype() public method

public setSimpleDoctype ( bool simpleDoctype ) : void
simpleDoctype bool
return void

Property Details

ALL_TAGS public_oe static_oe property

public static string ALL_TAGS
return string

BLOCK_TAGS_MAX public_oe static_oe property

public static string BLOCK_TAGS_MAX
return string

BLOCK_TAGS_MIN public_oe static_oe property

public static string BLOCK_TAGS_MIN
return string

PHP_TAG_PATTERN public_oe static_oe property

public static Regex,System.Text.RegularExpressions PHP_TAG_PATTERN
return System.Text.RegularExpressions.Regex

SERVER_SCRIPT_TAG_PATTERN public_oe static_oe property

public static Regex,System.Text.RegularExpressions SERVER_SCRIPT_TAG_PATTERN
return System.Text.RegularExpressions.Regex

SERVER_SIDE_INCLUDE_PATTERN public_oe static_oe property

public static Regex,System.Text.RegularExpressions SERVER_SIDE_INCLUDE_PATTERN
return System.Text.RegularExpressions.Regex