C# Class Westwind.RazorHosting.Utilities

Helper class that provides a few simple utilitity functions to the project
Afficher le fichier Open project: RickStrahl/Westwind.RazorHosting

Méthodes publiques

Méthode Description
GetRelativePath ( string fullPath, string basePath ) : string

Returns a relative path based on a base path. Examples: <<ul>> <<li>> filename.txt <<li>> subDir\filename.txt <<li>> ..\filename.txt <<li>> ..\..\filename.txt <</ul>> Class Utilities

HtmlEncode ( object value ) : string

HtmlEncodes any value by calling ToString() first

HtmlEncode ( string text ) : string

HTML-encodes a string and returns the encoded string.

Method Details

GetRelativePath() public static méthode

Returns a relative path based on a base path. Examples: <<ul>> <<li>> filename.txt <<li>> subDir\filename.txt <<li>> ..\filename.txt <<li>> ..\..\filename.txt <</ul>> Class Utilities
public static GetRelativePath ( string fullPath, string basePath ) : string
fullPath string /// The full path from which to generate a relative path ///
basePath string /// The base path based on which the relative path is based on ///
Résultat string

HtmlEncode() public static méthode

HtmlEncodes any value by calling ToString() first
public static HtmlEncode ( object value ) : string
value object
Résultat string

HtmlEncode() public static méthode

HTML-encodes a string and returns the encoded string.
public static HtmlEncode ( string text ) : string
text string The text string to encode.
Résultat string