C# Класс Cruncher.CruncherBase

The cruncher base. Inherit from this to implement your own cruncher.
Показать файл Открыть проект

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

Метод Описание
AddFileMonitor ( string file, string contents ) : void

Adds a cached file monitor to the list.

CrunchAsync ( string resource ) : Task

Crunches the specified resource.

Minify ( string resource ) : string

Minifies the specified resource.

Защищенные методы

Метод Описание
CruncherBase ( CruncherOptions options ) : System

Initializes a new instance of the CruncherBase class.

LoadLocalFileAsync ( string file ) : Task

Loads the local file.

PreProcessInput ( string input, string path ) : string

Transforms the content of the given string using the correct PreProcessor.

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

Метод Описание
IsRemoteFile ( string resource ) : bool

Determines whether the current resource is a remote file.

IsValidFile ( string resource ) : bool

Determines whether the current resource is a valid file.

IsValidPath ( string resource ) : bool

Determines whether the current resource is a valid path.

LoadLocalFolderAsync ( string folder ) : Task

Loads the local folder.

LoadRemoteFileAsync ( string url ) : Task

Loads the remote file.

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

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

Adds a cached file monitor to the list.
public AddFileMonitor ( string file, string contents ) : void
file string /// The file to add to the monitors list. ///
contents string /// The contents of the file. ///
Результат void

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

Crunches the specified resource.
public CrunchAsync ( string resource ) : Task
resource string The file or folder containing the resource(s) to crunch.
Результат Task

CruncherBase() защищенный Метод

Initializes a new instance of the CruncherBase class.
protected CruncherBase ( CruncherOptions options ) : System
options CruncherOptions The options containing instructions for the cruncher.
Результат System

LoadLocalFileAsync() защищенный Метод

Loads the local file.
protected LoadLocalFileAsync ( string file ) : Task
file string The file to load.
Результат Task

Minify() публичный абстрактный Метод

Minifies the specified resource.
public abstract Minify ( string resource ) : string
resource string The resource.
Результат string

PreProcessInput() защищенный Метод

Transforms the content of the given string using the correct PreProcessor.
protected PreProcessInput ( string input, string path ) : string
input string The input string to transform.
path string The path to the file.
Результат string