C# Класс B4BCore.BundlerForBower

This class contains extention methods to produce html strings to include CSS or JavaScript files in a HTML page
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
BundlerForBower ( string jsonDataDir, string>.Func getAbsPathFromVirtualPath, string>.Func getChecksumFromRelPath ) : System

This creates the class ready for bundling

CalculateHtmlIncludes ( string bundleName, CssOrJs cssOrJs, bool inDevelopment, string>.Func getContentUrl ) : string

This returns the appropriate html string to include in the web page such that the requested bundle will be loaded.

FormStaticFileWithCacheBuster ( string absFileUrl, string cacheBusterValue ) : string

This returns a file reference with a cachebuster value added.

Приватные методы

Метод Описание
FormCdnIncludes ( IEnumerable cdnLinks, string bundleName, CssOrJs cssOrJs, FileTypeConfigInfo fileTypeInfo, string>.Func getContentUrl ) : string
FormSingleMinifiedFileInclude ( string bundleName, CssOrJs cssOrJs, FileTypeConfigInfo fileTypeInfo, string>.Func getContentUrl ) : string

Описание методов

BundlerForBower() публичный Метод

This creates the class ready for bundling
public BundlerForBower ( string jsonDataDir, string>.Func getAbsPathFromVirtualPath, string>.Func getChecksumFromRelPath ) : System
jsonDataDir string The absolute directory path to the folder that holds the BowerBundles.json and the /// optional BundlerForBower.json config file
getAbsPathFromVirtualPath string>.Func This is a function which given a path relative to the MVC project /// will return the absolute path. In MVC5 this is provided by System.Web.Hosting.HostingEnvironment.MapPath.
getChecksumFromRelPath string>.Func This is a function returns a checksum of a file referred to via an relative path /// Can be null, in which case no checksum can be used.
Результат System

CalculateHtmlIncludes() публичный Метод

This returns the appropriate html string to include in the web page such that the requested bundle will be loaded.
public CalculateHtmlIncludes ( string bundleName, CssOrJs cssOrJs, bool inDevelopment, string>.Func getContentUrl ) : string
bundleName string
cssOrJs CssOrJs
inDevelopment bool This controls whether we supply individual files or development mode /// or single minified files/CDNs in non-development mode
getContentUrl string>.Func method to get url of content
Результат string

FormStaticFileWithCacheBuster() публичный Метод

This returns a file reference with a cachebuster value added.
public FormStaticFileWithCacheBuster ( string absFileUrl, string cacheBusterValue ) : string
absFileUrl string
cacheBusterValue string
Результат string