C# Class Plovr.Modules.Handler

Afficher le fichier Open project: hikirsch/Plovr.NET

Protected Properties

Свойство Type Description
CurrentProject IPlovrProject
CurrentSettings Plovr.Model.PlovrSettings

Méthodes publiques

Méthode Description
CreateInstance ( string typeStr, HttpContext context ) : Handler

Create a new instance of the specific route that is, this is a static method.

Run ( ) : void

An abstract method, every handler will implement this function and will be called after alll common pre-processing has occured.

Méthodes protégées

Méthode Description
FixSlash ( string str ) : string

Windows file system slashes are \, URL's are in /, this makes things a little easier for us.

GetIdFromUri ( ) : string

The ID can be passed from the QueryString to override the DefaultProject flag.

Override in subclasses if you need to get it from path instead of QueryString

GetRootUrl ( ) : string

return a root url of the plovr handler, e.g. http://localhost:9810/Plovr.NET

Handler ( HttpContext context ) : System

Constructor, starts by initalizing the current project and settings properties.

InitCurrentProject ( ) : void
ResolveInputPath ( string fullPath ) : string

Pass a full path and convert it to an input handler path

ShowHtmlResponse ( string response ) : void

Show the resposne with the html content type.

ShowJavaScriptFileResponse ( string file ) : void

Show a file in the response and set the content type as javascript.

ShowJavaScriptResponse ( string response ) : void

Show the response with a javascript content type.

ShowResponse ( string response, string contentType ) : void

Show the response with the specified content type. The request will then end.

ToJson ( List output ) : string

Convert closure compiler messages to JSON.

Private Methods

Méthode Description
GetModeFromQueryString ( ) : ClosureCompilerMode?

Retrieves a mode override from the querystring, if it exists.

InitSettings ( ) : void

Using the HttpContext as the current website that is loaded, load the current project and settings.

Method Details

CreateInstance() public static méthode

Create a new instance of the specific route that is, this is a static method.
public static CreateInstance ( string typeStr, HttpContext context ) : Handler
typeStr string a string representation of the current route
context System.Web.HttpContext the http context
Résultat Handler

FixSlash() protected méthode

Windows file system slashes are \, URL's are in /, this makes things a little easier for us.
protected FixSlash ( string str ) : string
str string the string we want to switch the slashes in
Résultat string

GetIdFromUri() protected méthode

The ID can be passed from the QueryString to override the DefaultProject flag.
Override in subclasses if you need to get it from path instead of QueryString
protected GetIdFromUri ( ) : string
Résultat string

GetRootUrl() protected méthode

return a root url of the plovr handler, e.g. http://localhost:9810/Plovr.NET
protected GetRootUrl ( ) : string
Résultat string

Handler() protected méthode

Constructor, starts by initalizing the current project and settings properties.
protected Handler ( HttpContext context ) : System
context System.Web.HttpContext
Résultat System

InitCurrentProject() protected méthode

protected InitCurrentProject ( ) : void
Résultat void

ResolveInputPath() protected méthode

Pass a full path and convert it to an input handler path
protected ResolveInputPath ( string fullPath ) : string
fullPath string the full path to convert
Résultat string

Run() public abstract méthode

An abstract method, every handler will implement this function and will be called after alll common pre-processing has occured.
public abstract Run ( ) : void
Résultat void

ShowHtmlResponse() protected méthode

Show the resposne with the html content type.
protected ShowHtmlResponse ( string response ) : void
response string
Résultat void

ShowJavaScriptFileResponse() protected méthode

Show a file in the response and set the content type as javascript.
protected ShowJavaScriptFileResponse ( string file ) : void
file string the file to output
Résultat void

ShowJavaScriptResponse() protected méthode

Show the response with a javascript content type.
protected ShowJavaScriptResponse ( string response ) : void
response string the output
Résultat void

ShowResponse() protected méthode

Show the response with the specified content type. The request will then end.
protected ShowResponse ( string response, string contentType ) : void
response string the output
contentType string the content type
Résultat void

ToJson() protected méthode

Convert closure compiler messages to JSON.
protected ToJson ( List output ) : string
output List the message output from the closure compiler
Résultat string

Property Details

CurrentProject protected_oe property

the current project settings that are loaded
protected IPlovrProject CurrentProject
Résultat IPlovrProject

CurrentSettings protected_oe property

the current settings for plovr
protected PlovrSettings,Plovr.Model CurrentSettings
Résultat Plovr.Model.PlovrSettings