C# Class Castle.MonoRail.Framework.Test.MockServerUtility

Represents a mock implementation of IServerUtility for unit test purposes.
Inheritance: IServerUtility
Datei anzeigen Open project: nats/castle-1.0.3-mono

Public Methods

Method Description
HtmlEncode ( string content ) : string

HTML encodes a string and returns the encoded string.

JavaScriptEscape ( string content ) : string

Escapes JavaScript with Url encoding and returns the encoded string.

Converts quotes, single quotes and CR/LFs to their representation as an escape character.

MapPath ( string virtualPath ) : string

Returns the physical path for the specified virtual path.

UrlDecode ( string content ) : string

URL decodes a string and returns the decoded string.

UrlEncode ( string content ) : string

URL encodes a string and returns the encoded string.

UrlPathEncode ( string content ) : string

URL encodes the path portion of a URL string and returns the encoded string.

Method Details

HtmlEncode() public method

HTML encodes a string and returns the encoded string.
public HtmlEncode ( string content ) : string
content string The text string to HTML encode.
return string

JavaScriptEscape() public method

Escapes JavaScript with Url encoding and returns the encoded string.
Converts quotes, single quotes and CR/LFs to their representation as an escape character.
public JavaScriptEscape ( string content ) : string
content string The text to URL encode and escape JavaScript within.
return string

MapPath() public method

Returns the physical path for the specified virtual path.
public MapPath ( string virtualPath ) : string
virtualPath string The virtual path.
return string

UrlDecode() public method

URL decodes a string and returns the decoded string.
public UrlDecode ( string content ) : string
content string The text to URL decode.
return string

UrlEncode() public method

URL encodes a string and returns the encoded string.
public UrlEncode ( string content ) : string
content string The text to URL encode.
return string

UrlPathEncode() public method

URL encodes the path portion of a URL string and returns the encoded string.
public UrlPathEncode ( string content ) : string
content string The text to URL encode.
return string