C# Класс B4BCore.CheckBundles

This is a class that contains various tests to ensure that your bundles are correctly formed and they are up to date.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
CheckAllBundlesAreValid ( ) : ReadOnlyCollection

This checks all the bundles in the bundle file are valid

CheckBundleFileIsNotNewerThanMinifiedFiles ( ) : string

This checks that the minified files for each bundle is older than the BowerBundles.json file that defines what is in a bundle.

CheckBundles ( Type classToFindProjectDirOf, string appDataDir = null, bool checkForConcatFile = true ) : System

This will setup checks the BundlesForBower in the assembly that the given type is in. It uses the data directory to find the BowerBundles.json and the bundlerForBower.json user config file

CheckBundles ( string mvcAppPath, string appDataDir = null, bool checkForConcatFile = true ) : System

This requires the path to the directory of the project where all the files are stored It uses the data directory to find the BowerBundles.json and the bundlerForBower.json user config file

CheckSingleBundleIsValid ( string bundleName ) : ReadOnlyCollection

Thic checks a specific bundle by name

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

Метод Описание
AddErrorIfAnyFilesInBadFiles ( string bundleName, IList badFiles, string errorMessage, ICollection errors ) : void
CheckCdnBundle ( string bundleName, ICollection allCdns ) : List
CheckNonCdnBundle ( string bundleName, IEnumerable allBundleDebugLines ) : List
GetProjectDirectoryFromType ( Type classToFindProjectDirOf ) : string

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

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

This checks all the bundles in the bundle file are valid
public CheckAllBundlesAreValid ( ) : ReadOnlyCollection
Результат ReadOnlyCollection

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

This checks that the minified files for each bundle is older than the BowerBundles.json file that defines what is in a bundle.
public CheckBundleFileIsNotNewerThanMinifiedFiles ( ) : string
Результат string

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

This will setup checks the BundlesForBower in the assembly that the given type is in. It uses the data directory to find the BowerBundles.json and the bundlerForBower.json user config file
public CheckBundles ( Type classToFindProjectDirOf, string appDataDir = null, bool checkForConcatFile = true ) : System
classToFindProjectDirOf System.Type
appDataDir string optional: if App_Data directory is not at the top level then you need to supply /// AppDomain.CurrentDomain.GetData("DataDirectory").ToString() or an equivalent absolute directory path
checkForConcatFile bool optional: by default it checks the concat file, /// but if you go straight to the minified file then set this to false
Результат System

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

This requires the path to the directory of the project where all the files are stored It uses the data directory to find the BowerBundles.json and the bundlerForBower.json user config file
public CheckBundles ( string mvcAppPath, string appDataDir = null, bool checkForConcatFile = true ) : System
mvcAppPath string The absolute path to the project you want to test.
appDataDir string optional: if App_Data directory is not at the top level then you need to supply /// AppDomain.CurrentDomain.GetData("DataDirectory").ToString() or an equivalent absolute directory path
checkForConcatFile bool optional: by default it checks the concat file, /// but if you go straight to the minified file then set this to false
Результат System

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

Thic checks a specific bundle by name
public CheckSingleBundleIsValid ( string bundleName ) : ReadOnlyCollection
bundleName string
Результат ReadOnlyCollection