C# Class Utilities.Web.HTMLExtensions

Afficher le fichier Open project: JaCraig/Craig-s-Utility-Library

Méthodes publiques

Méthode Description
AbsoluteRoot ( this Context ) : Uri

Returns the absolute root

AddScriptFile ( this Page, FileInfo File ) : void

Adds a script file to the header of the current page

ContainsHTML ( this Input ) : bool

Decides if the string contains HTML

HTTPCompress ( this Context, bool RemovePrettyPrinting = false, MinificationType Type = MinificationType.HTML ) : void

Adds HTTP compression to the current context

IsEncodingAccepted ( this Context, string Encoding ) : bool

Checks the request headers to see if the specified encoding is accepted by the client.

RemoveURLIllegalCharacters ( this Input ) : string

Removes illegal characters (used in uri's, etc.)

SetEncoding ( this Context, string Encoding ) : void

Adds the specified encoding to the response headers.

StripHTML ( this HTML ) : string

Removes HTML elements from a string

URLDecode ( this Input ) : string

URL decodes a string

URLEncode ( this Input ) : string

URL encodes a string

Private Methods

Méthode Description
RelativeRoot ( this Context ) : string
RemoveDiacritics ( string Input ) : string

Removes special characters (Diacritics) from the string

RemoveExtraHyphen ( string Input ) : string

Removes extra hyphens from a string

Method Details

AbsoluteRoot() public static méthode

Returns the absolute root
public static AbsoluteRoot ( this Context ) : Uri
Context this
Résultat System.Uri

AddScriptFile() public static méthode

Adds a script file to the header of the current page
public static AddScriptFile ( this Page, FileInfo File ) : void
Page this Page to add it to
File FileInfo Script file
Résultat void

ContainsHTML() public static méthode

Decides if the string contains HTML
public static ContainsHTML ( this Input ) : bool
Input this Input string to check
Résultat bool

HTTPCompress() public static méthode

Adds HTTP compression to the current context
public static HTTPCompress ( this Context, bool RemovePrettyPrinting = false, MinificationType Type = MinificationType.HTML ) : void
Context this Current context
RemovePrettyPrinting bool /// Sets the response filter to a special stream that removes pretty printing from content ///
Type MinificationType /// The minification type to use (defaults to HTML if RemovePrettyPrinting is set to true, /// but can also deal with CSS and Javascript) ///
Résultat void

IsEncodingAccepted() public static méthode

Checks the request headers to see if the specified encoding is accepted by the client.
public static IsEncodingAccepted ( this Context, string Encoding ) : bool
Context this
Encoding string
Résultat bool

RemoveURLIllegalCharacters() public static méthode

Removes illegal characters (used in uri's, etc.)
public static RemoveURLIllegalCharacters ( this Input ) : string
Input this string to be converted
Résultat string

SetEncoding() public static méthode

Adds the specified encoding to the response headers.
public static SetEncoding ( this Context, string Encoding ) : void
Context this Context to set the encoding on
Encoding string Encoding to set
Résultat void

StripHTML() public static méthode

Removes HTML elements from a string
public static StripHTML ( this HTML ) : string
HTML this HTML laiden string
Résultat string

URLDecode() public static méthode

URL decodes a string
public static URLDecode ( this Input ) : string
Input this Input to decode
Résultat string

URLEncode() public static méthode

URL encodes a string
public static URLEncode ( this Input ) : string
Input this Input to encode
Résultat string