C# Class Framework.Mvc.Extensions.AssetsExtensions

Adds methods for resource managing to HtmlHelper.
显示文件 Open project: coreframework/Core-Framework

Public Properties

Property Type Description
AssetPackagesConfigPath String
CssPath String
JavascriptPath String
PluginCssPath String

Public Methods

Method Description
CssHelper ( HttpContext context, String path, RouteValueDictionary htmlAttributes ) : String

CSSs the helper.

CssInclude ( this html, String css ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including specified css-file.

CssInclude ( this html, String css, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including specified css-file.

CssPackInclude ( this html, String packageName ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including css-files specified in assets config (AssetPackagesConfigPath).

CssPackInclude ( this html, String packageName, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including css-files specified in assets config (AssetPackagesConfigPath).

CssPluginPackHelper ( HttpContext context, IEnumerable plugins, String fileName, RouteValueDictionary htmlAttributes ) : String

CSSs the widget pack helper.

CssPluginPackHelper ( System.Web.HttpContextBase context, IEnumerable plugins, String fileName, RouteValueDictionary htmlAttributes ) : String

CSSs the widget pack helper.

JavascriptHelper ( System.Web.HttpContextBase context, String path ) : String

Generates javascript link.

JavascriptInclude ( this html, String javascript ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including specified javascript-file.

JavascriptInclude ( this html, String javascript, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including specified javascript-file.

JavascriptPackInclude ( this html, String packageName ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including javascript-files specified in assets config (AssetPackagesConfigPath).

JavascriptPackInclude ( this html, String packageName, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString

Generates HTML markup for including javascript-files specified in assets config (AssetPackagesConfigPath).

Private Methods

Method Description
CssHelper ( System.Web.HttpContextBase context, String css, RouteValueDictionary htmlAttributes ) : String
CssPackHelper ( System.Web.HttpContextBase context, String packageName, RouteValueDictionary htmlAttributes ) : String

Generates HTML markup for including css-files specified in assets config (AssetPackagesConfigPath).

GetEnvironment ( ) : Framework.Core.Configuration.Environment
GetTimeStamp ( System.Web.HttpContextBase context, String path ) : String
JavascriptHelper ( System.Web.HttpContextBase context, String javascript, RouteValueDictionary htmlAttributes ) : String
JavascriptPackHelper ( System.Web.HttpContextBase context, String packageName, RouteValueDictionary htmlAttributes ) : String
ToAbsolutePath ( String path, String directoryPath ) : String

Method Details

CssHelper() public static method

CSSs the helper.
public static CssHelper ( HttpContext context, String path, RouteValueDictionary htmlAttributes ) : String
context System.Web.HttpContext The context.
path String The Css href path.
htmlAttributes RouteValueDictionary The HTML attributes.
return String

CssInclude() public static method

Generates HTML markup for including specified css-file.
public static CssInclude ( this html, String css ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
css String The css file path relative to .
return System.Web.Mvc.MvcHtmlString

CssInclude() public static method

Generates HTML markup for including specified css-file.
public static CssInclude ( this html, String css, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
css String The css file path relative to .
htmlAttributes Object The HTML attributes.
return System.Web.Mvc.MvcHtmlString

CssPackInclude() public static method

Generates HTML markup for including css-files specified in assets config (AssetPackagesConfigPath).
public static CssPackInclude ( this html, String packageName ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
packageName String Name of the package specified in assets config.
return System.Web.Mvc.MvcHtmlString

CssPackInclude() public static method

Generates HTML markup for including css-files specified in assets config (AssetPackagesConfigPath).
public static CssPackInclude ( this html, String packageName, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
packageName String Name of the package specified in assets config.
htmlAttributes Object The HTML attributes.
return System.Web.Mvc.MvcHtmlString

CssPluginPackHelper() public static method

CSSs the widget pack helper.
public static CssPluginPackHelper ( HttpContext context, IEnumerable plugins, String fileName, RouteValueDictionary htmlAttributes ) : String
context System.Web.HttpContext The context.
plugins IEnumerable The plugins.
fileName String Name of the file.
htmlAttributes RouteValueDictionary The HTML attributes.
return String

CssPluginPackHelper() public static method

CSSs the widget pack helper.
public static CssPluginPackHelper ( System.Web.HttpContextBase context, IEnumerable plugins, String fileName, RouteValueDictionary htmlAttributes ) : String
context System.Web.HttpContextBase The context.
plugins IEnumerable The plugins.
fileName String Name of the file.
htmlAttributes RouteValueDictionary The HTML attributes.
return String

JavascriptHelper() public static method

Generates javascript link.
public static JavascriptHelper ( System.Web.HttpContextBase context, String path ) : String
context System.Web.HttpContextBase The context.
path String The javascript file path.
return String

JavascriptInclude() public static method

Generates HTML markup for including specified javascript-file.
public static JavascriptInclude ( this html, String javascript ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
javascript String The javascript file path relative to .
return System.Web.Mvc.MvcHtmlString

JavascriptInclude() public static method

Generates HTML markup for including specified javascript-file.
public static JavascriptInclude ( this html, String javascript, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
javascript String The javascript file path relative to .
htmlAttributes Object The HTML attributes.
return System.Web.Mvc.MvcHtmlString

JavascriptPackInclude() public static method

Generates HTML markup for including javascript-files specified in assets config (AssetPackagesConfigPath).
public static JavascriptPackInclude ( this html, String packageName ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
packageName String Name of the package specified in assets config.
return System.Web.Mvc.MvcHtmlString

JavascriptPackInclude() public static method

Generates HTML markup for including javascript-files specified in assets config (AssetPackagesConfigPath).
public static JavascriptPackInclude ( this html, String packageName, Object htmlAttributes ) : System.Web.Mvc.MvcHtmlString
html this The HTML helper instance that this method extends.
packageName String Name of the package specified in assets config.
htmlAttributes Object The HTML attributes.
return System.Web.Mvc.MvcHtmlString

Property Details

AssetPackagesConfigPath public_oe static_oe property

Path for asset packager config.
public static String AssetPackagesConfigPath
return String

CssPath public_oe static_oe property

Virtual path for directory with css files (~/Content/Css/).
public static String CssPath
return String

JavascriptPath public_oe static_oe property

Virtual path for directory with javascript files (~/Scripts/).
public static String JavascriptPath
return String

PluginCssPath public_oe static_oe property

Virtual path for directory with css files (~/Content/Css/).
public static String PluginCssPath
return String