C# Class Cruncher.CruncherBase

The cruncher base. Inherit from this to implement your own cruncher.
Afficher le fichier Open project: JimBobSquarePants/Cruncher

Méthodes publiques

Méthode Description
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.

Méthodes protégées

Méthode Description
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.

Private Methods

Méthode Description
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.

Method Details

AddFileMonitor() public méthode

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. ///
Résultat void

CrunchAsync() public méthode

Crunches the specified resource.
public CrunchAsync ( string resource ) : Task
resource string The file or folder containing the resource(s) to crunch.
Résultat Task

CruncherBase() protected méthode

Initializes a new instance of the CruncherBase class.
protected CruncherBase ( CruncherOptions options ) : System
options CruncherOptions The options containing instructions for the cruncher.
Résultat System

LoadLocalFileAsync() protected méthode

Loads the local file.
protected LoadLocalFileAsync ( string file ) : Task
file string The file to load.
Résultat Task

Minify() public abstract méthode

Minifies the specified resource.
public abstract Minify ( string resource ) : string
resource string The resource.
Résultat string

PreProcessInput() protected méthode

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.
Résultat string