C# Class Framework.Mvc.Helpers.AssetsHelper

Provides helper functionality for resources packaging.
显示文件 Open project: coreframework/Core-Framework

Public Properties

Property Type Description
DefaultConfigPath String

Public Methods

Method Description
BuildCssPack ( Framework.Core.Configuration.Environment environment, String packageName, String cssPath ) : String

Builds the css package file specified in .

If package file already exists it will be rebuilt according with files access time.

BuildCssPack ( Framework.Core.Configuration.Environment environment, String packageName, String cssPath, String configPath ) : String

Builds the css package file specified in configPath.

If package file already exists it will be rebuilt according with files access time.

BuildJavascriptPack ( Framework.Core.Configuration.Environment environment, String packageName, String javascriptPath ) : String

Builds the javascript package file specified in .

If package file already exists it will be rebuilt according with files access time.

BuildJavascriptPack ( Framework.Core.Configuration.Environment environment, String packageName, String javascriptPath, String configPath ) : String

Builds the javascript package file specified in configPath.

If package file already exists it will be rebuilt according with files access time.

BuildPluginCssPack ( ICorePlugin corePlugin, String applicationServerPath ) : String

Builds the plugin CSS pack.

BuildPluginsCssPack ( IEnumerable corePlugins, String applicationServerPath, String cssServerPath, String fileName ) : String

Builds the plugins CSS pack.

GetAssetsConfig ( Framework.Core.Configuration.Environment environment ) : dynamic

Reads assets config from .

If environment equals to Environment.Development configuration will be read on each call; otherwise configuration will be read only on first call.

GetAssetsConfig ( Framework.Core.Configuration.Environment environment, String configPath ) : dynamic

Reads assets config from configPath.

If environment equals to Environment.Development configuration will be read on each call; otherwise configuration will be read only on first call.

GetCssPackFiles ( Framework.Core.Configuration.Environment environment, String packageName ) : IEnumerable

Gets list of files included in css package specified in .

GetCssPackFiles ( Framework.Core.Configuration.Environment environment, String packageName, String configPath ) : IEnumerable

Gets list of files included in css package specified in configPath.

GetJavascriptPackFiles ( Framework.Core.Configuration.Environment environment, String packageName ) : IEnumerable

Gets list of files included in javascript package specified in .

GetJavascriptPackFiles ( Framework.Core.Configuration.Environment environment, String packageName, String configPath ) : IEnumerable

Gets list of files included in javascript package specified in configPath.

GetPluginAssetsConfig ( String configPath ) : dynamic

Reads plugin assets config from configPath.

GetPluginCssPackFiles ( String packageName, String configPath ) : IEnumerable

Gets list of files included in plugin css package specified in configPath.

GetPluginInnerJsPath ( ICorePlugin corePlugin ) : String

Gets the plugin inner js path.

GetPluginInnerJsVirtualPath ( ICorePlugin corePlugin, String applicationVirtualPath, String applicationServerPath ) : String

Gets the plugin inner js path.

GetPluginJsPackFiles ( String packageName, String configPath, String scriptType ) : IEnumerable

Gets list of files included in plugin js package specified in configPath.

Private Methods

Method Description
GetMaxLastModifyDate ( String baseDirectory, IEnumerable files ) : System.DateTime
MakeVirtualCssPath ( ICorePlugin coreWidget, String serverPath ) : String

Makes the virtual CSS path.

ReplaceCssUrls ( String cssContent, String imagePluginPath ) : String

Replaces the CSS urls.

Method Details

BuildCssPack() public static method

Builds the css package file specified in .
If package file already exists it will be rebuilt according with files access time.
public static BuildCssPack ( Framework.Core.Configuration.Environment environment, String packageName, String cssPath ) : String
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
cssPath String The css directory server path.
return String

BuildCssPack() public static method

Builds the css package file specified in configPath.
If package file already exists it will be rebuilt according with files access time.
public static BuildCssPack ( Framework.Core.Configuration.Environment environment, String packageName, String cssPath, String configPath ) : String
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
cssPath String The css directory server path.
configPath String Assets config path.
return String

BuildJavascriptPack() public static method

Builds the javascript package file specified in .
If package file already exists it will be rebuilt according with files access time.
public static BuildJavascriptPack ( Framework.Core.Configuration.Environment environment, String packageName, String javascriptPath ) : String
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
javascriptPath String The javascript directory server path.
return String

BuildJavascriptPack() public static method

Builds the javascript package file specified in configPath.
If package file already exists it will be rebuilt according with files access time.
public static BuildJavascriptPack ( Framework.Core.Configuration.Environment environment, String packageName, String javascriptPath, String configPath ) : String
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
javascriptPath String The javascript directory server path.
configPath String Assets config path.
return String

BuildPluginCssPack() public static method

Builds the plugin CSS pack.
public static BuildPluginCssPack ( ICorePlugin corePlugin, String applicationServerPath ) : String
corePlugin ICorePlugin The core plugin.
applicationServerPath String The application server path.
return String

BuildPluginsCssPack() public static method

Builds the plugins CSS pack.
public static BuildPluginsCssPack ( IEnumerable corePlugins, String applicationServerPath, String cssServerPath, String fileName ) : String
corePlugins IEnumerable The core widgets.
applicationServerPath String The application server path.
cssServerPath String The CSS server path.
fileName String Name of the file.
return String

GetAssetsConfig() public static method

Reads assets config from .
If environment equals to Environment.Development configuration will be read on each call; otherwise configuration will be read only on first call.
public static GetAssetsConfig ( Framework.Core.Configuration.Environment environment ) : dynamic
environment Framework.Core.Configuration.Environment The environment.
return dynamic

GetAssetsConfig() public static method

Reads assets config from configPath.
If environment equals to Environment.Development configuration will be read on each call; otherwise configuration will be read only on first call.
public static GetAssetsConfig ( Framework.Core.Configuration.Environment environment, String configPath ) : dynamic
environment Framework.Core.Configuration.Environment The environment.
configPath String The configuration path.
return dynamic

GetCssPackFiles() public static method

Gets list of files included in css package specified in .
public static GetCssPackFiles ( Framework.Core.Configuration.Environment environment, String packageName ) : IEnumerable
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
return IEnumerable

GetCssPackFiles() public static method

Gets list of files included in css package specified in configPath.
public static GetCssPackFiles ( Framework.Core.Configuration.Environment environment, String packageName, String configPath ) : IEnumerable
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
configPath String The configuration path.
return IEnumerable

GetJavascriptPackFiles() public static method

Gets list of files included in javascript package specified in .
public static GetJavascriptPackFiles ( Framework.Core.Configuration.Environment environment, String packageName ) : IEnumerable
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
return IEnumerable

GetJavascriptPackFiles() public static method

Gets list of files included in javascript package specified in configPath.
public static GetJavascriptPackFiles ( Framework.Core.Configuration.Environment environment, String packageName, String configPath ) : IEnumerable
environment Framework.Core.Configuration.Environment The environment.
packageName String Name of the package.
configPath String The configuration path.
return IEnumerable

GetPluginAssetsConfig() public static method

Reads plugin assets config from configPath.
public static GetPluginAssetsConfig ( String configPath ) : dynamic
configPath String The configuration path.
return dynamic

GetPluginCssPackFiles() public static method

Gets list of files included in plugin css package specified in configPath.
public static GetPluginCssPackFiles ( String packageName, String configPath ) : IEnumerable
packageName String Name of the package.
configPath String The configuration path.
return IEnumerable

GetPluginInnerJsPath() public static method

Gets the plugin inner js path.
public static GetPluginInnerJsPath ( ICorePlugin corePlugin ) : String
corePlugin ICorePlugin The core plugin.
return String

GetPluginInnerJsVirtualPath() public static method

Gets the plugin inner js path.
public static GetPluginInnerJsVirtualPath ( ICorePlugin corePlugin, String applicationVirtualPath, String applicationServerPath ) : String
corePlugin ICorePlugin The core plugin.
applicationVirtualPath String The application virtual path.
applicationServerPath String The application server path.
return String

GetPluginJsPackFiles() public static method

Gets list of files included in plugin js package specified in configPath.
public static GetPluginJsPackFiles ( String packageName, String configPath, String scriptType ) : IEnumerable
packageName String Name of the package.
configPath String The configuration path.
scriptType String The type of script (internal/external).
return IEnumerable

Property Details

DefaultConfigPath public_oe static_oe property

Default assets configuration application relative path.
public static String DefaultConfigPath
return String