C# Class WebMarkupMin.Core.XmlMinifier

XML minifier
Inheritance: IMarkupMinifier
Mostrar archivo Open project: Taritsyn/WebMarkupMin Class Usage Examples

Public Methods

Method Description
Minify ( string content ) : MarkupMinificationResult

Minify XML content

Minify ( string content, Encoding encoding ) : MarkupMinificationResult

Minify XML content

Minify ( string content, bool generateStatistics ) : MarkupMinificationResult

Minify XML content

Minify ( string content, string fileContext ) : MarkupMinificationResult

Minify XML content

Minify ( string content, string fileContext, Encoding encoding, bool generateStatistics ) : MarkupMinificationResult

Minify XML content

XmlMinifier ( XmlMinificationSettings settings = null, ILogger logger = null ) : System

Constructs instance of XML minifier

Private Methods

Method Description
BuildAttributeString ( XmlAttribute attribute ) : string

Builds a string representation of the attribute

CdataSectionHandler ( MarkupParsingContext context, string cdataText ) : void

CDATA sections handler

CommentHandler ( MarkupParsingContext context, string commentText ) : void

Comments handler

DoctypeDelegateHandler ( MarkupParsingContext context, string doctype ) : void

Document type declaration handler

EmptyTagHandler ( MarkupParsingContext context, string tagName, IList attributes ) : void

Empty tags handler

EndTagHandler ( MarkupParsingContext context, string tagName ) : void

End tags handler

FlushBuffer ( ) : void

Flush a HTML minification buffer

IgnoredFragmentHandler ( MarkupParsingContext context, string fragment ) : void

Ignored fragments handler

ProcessingInstructionHandler ( MarkupParsingContext context, string instructionName, IList attributes ) : void

Processing instruction handler

RemoveLastWhitespaceBufferItems ( ) : void

Removes a last whitespace items from buffer

RenderAttributes ( IList attributes ) : void

Renders a list of attributes

StartTagHandler ( MarkupParsingContext context, string tagName, IList attributes ) : void

Start tags handler

TextHandler ( MarkupParsingContext context, string text ) : void

Text handler

TransformLastStartTagToEmptyTag ( ) : bool

Transform a last start tag to empty tag

WriteError ( string category, string message, string filePath, int lineNumber, int columnNumber, string sourceFragment ) : void

Writes a information about the error

XmlDeclarationHandler ( MarkupParsingContext context, IList attributes ) : void

XML declaration handler

Method Details

Minify() public method

Minify XML content
public Minify ( string content ) : MarkupMinificationResult
content string Text content
return MarkupMinificationResult

Minify() public method

Minify XML content
public Minify ( string content, Encoding encoding ) : MarkupMinificationResult
content string Text content
encoding System.Text.Encoding Text encoding
return MarkupMinificationResult

Minify() public method

Minify XML content
public Minify ( string content, bool generateStatistics ) : MarkupMinificationResult
content string Text content
generateStatistics bool Flag for whether to allow generate minification statistics
return MarkupMinificationResult

Minify() public method

Minify XML content
public Minify ( string content, string fileContext ) : MarkupMinificationResult
content string Text content
fileContext string File context
return MarkupMinificationResult

Minify() public method

Minify XML content
public Minify ( string content, string fileContext, Encoding encoding, bool generateStatistics ) : MarkupMinificationResult
content string XML content
fileContext string File context
encoding System.Text.Encoding Text encoding
generateStatistics bool Flag for whether to allow generate minification statistics
return MarkupMinificationResult

XmlMinifier() public method

Constructs instance of XML minifier
public XmlMinifier ( XmlMinificationSettings settings = null, ILogger logger = null ) : System
settings XmlMinificationSettings XML minification settings
logger ILogger Logger
return System