C# Класс Utilities.Web.HTMLExtensions

Показать файл Открыть проект

Открытые методы

Метод Описание
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

Приватные методы

Метод Описание
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

Описание методов

AbsoluteRoot() публичный статический Метод

Returns the absolute root
public static AbsoluteRoot ( this Context ) : Uri
Context this
Результат System.Uri

AddScriptFile() публичный статический Метод

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
Результат void

ContainsHTML() публичный статический Метод

Decides if the string contains HTML
public static ContainsHTML ( this Input ) : bool
Input this Input string to check
Результат bool

HTTPCompress() публичный статический Метод

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) ///
Результат void

IsEncodingAccepted() публичный статический Метод

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
Результат bool

RemoveURLIllegalCharacters() публичный статический Метод

Removes illegal characters (used in uri's, etc.)
public static RemoveURLIllegalCharacters ( this Input ) : string
Input this string to be converted
Результат string

SetEncoding() публичный статический Метод

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
Результат void

StripHTML() публичный статический Метод

Removes HTML elements from a string
public static StripHTML ( this HTML ) : string
HTML this HTML laiden string
Результат string

URLDecode() публичный статический Метод

URL decodes a string
public static URLDecode ( this Input ) : string
Input this Input to decode
Результат string

URLEncode() публичный статический Метод

URL encodes a string
public static URLEncode ( this Input ) : string
Input this Input to encode
Результат string