C# 클래스 Cruncher.CruncherBase

The cruncher base. Inherit from this to implement your own cruncher.
파일 보기 프로젝트 열기: JimBobSquarePants/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