C# Class WhoCanHelpMe.Web.Code.UrlHelperExtensions

UrlHelper extension methods.
All of which taken from sample solr mvc application. NK.
显示文件 Open project: jongeorge1/Who-Can-Help-Me

Public Methods

Method Description
DictToQuerystring ( string>.IDictionary qs ) : string

Dicts to querystring.

Images ( this urlHelper, string fileName ) : string

Imageses the specified URL helper.

ParseQueryString ( string s ) : string>.IDictionary

Parses a query string. If duplicates are present, the last key/value is kept.

RemoveParameters ( this helper ) : string

Removes the parameters.

RemoveParametersUrl ( this helper, string url ) : string

Removes parameters from an url's query string

Scripts ( this urlHelper, string fileName ) : string

Helper method to return a formatted javascript url

SetParameter ( this helper, string key, object value ) : string

Sets/changes a single parameter from the current query string.

SetParameter ( this helper, string url, string key, string value ) : string

Sets/changes an url's query string parameter.

SetParameters ( this helper, object parameterDictionary ) : string

Sets/changes the current query string's parameters, using parameterDictionary as dictionary

SetParameters ( this helper, string url, object>.IDictionary parameters ) : string

Sets/changes an url's query string parameters.

Stylesheet ( this urlHelper, string fileName ) : string

Helper method to return a formatted stylesheet url

ToNullOrString ( object o ) : string

Toes the null or string.

ToPropertyDictionary ( object o ) : object>.IDictionary

Builds a dictionary from the object's properties

Method Details

DictToQuerystring() public static method

Dicts to querystring.
public static DictToQuerystring ( string>.IDictionary qs ) : string
qs string>.IDictionary The querystring dictionary.
return string

Images() public static method

Imageses the specified URL helper.
public static Images ( this urlHelper, string fileName ) : string
urlHelper this /// The URL helper. ///
fileName string /// Name of the file. ///
return string

ParseQueryString() public static method

Parses a query string. If duplicates are present, the last key/value is kept.
public static ParseQueryString ( string s ) : string>.IDictionary
s string The querystring to parse.
return string>.IDictionary

RemoveParameters() public static method

Removes the parameters.
public static RemoveParameters ( this helper ) : string
helper this The helper.
return string

RemoveParametersUrl() public static method

Removes parameters from an url's query string
public static RemoveParametersUrl ( this helper, string url ) : string
helper this The helper.
url string URL to process
return string

Scripts() public static method

Helper method to return a formatted javascript url
public static Scripts ( this urlHelper, string fileName ) : string
urlHelper this /// The url helper. ///
fileName string /// The file name. ///
return string

SetParameter() public static method

Sets/changes a single parameter from the current query string.
public static SetParameter ( this helper, string key, object value ) : string
helper this The helper.
key string Parameter key
value object Parameter value
return string

SetParameter() public static method

Sets/changes an url's query string parameter.
public static SetParameter ( this helper, string url, string key, string value ) : string
helper this The helper.
url string URL to process
key string Query string parameter key to set/change
value string Query string parameter value
return string

SetParameters() public static method

Sets/changes the current query string's parameters, using parameterDictionary as dictionary
public static SetParameters ( this helper, object parameterDictionary ) : string
helper this The helper.
parameterDictionary object Parameters to set/change
return string

SetParameters() public static method

Sets/changes an url's query string parameters.
public static SetParameters ( this helper, string url, object>.IDictionary parameters ) : string
helper this The helper.
url string URL to process
parameters object>.IDictionary Paramteres to set/change
return string

Stylesheet() public static method

Helper method to return a formatted stylesheet url
public static Stylesheet ( this urlHelper, string fileName ) : string
urlHelper this /// The url helper. ///
fileName string /// The file name. ///
return string

ToNullOrString() public static method

Toes the null or string.
public static ToNullOrString ( object o ) : string
o object The object.
return string

ToPropertyDictionary() public static method

Builds a dictionary from the object's properties
public static ToPropertyDictionary ( object o ) : object>.IDictionary
o object The object.
return object>.IDictionary