C# Class Plovr.Modules.Handler

Mostra file Open project: hikirsch/Plovr.NET

Protected Properties

Property Type Description
CurrentProject IPlovrProject
CurrentSettings Plovr.Model.PlovrSettings

Public Methods

Method 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.

Protected Methods

Method 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

Method 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 method

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
return Handler

FixSlash() protected method

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
return string

GetIdFromUri() protected method

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
return string

GetRootUrl() protected method

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

Handler() protected method

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

InitCurrentProject() protected method

protected InitCurrentProject ( ) : void
return void

ResolveInputPath() protected method

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

Run() public abstract method

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

ShowHtmlResponse() protected method

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

ShowJavaScriptFileResponse() protected method

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

ShowJavaScriptResponse() protected method

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

ShowResponse() protected method

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
return void

ToJson() protected method

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

Property Details

CurrentProject protected_oe property

the current project settings that are loaded
protected IPlovrProject CurrentProject
return IPlovrProject

CurrentSettings protected_oe property

the current settings for plovr
protected PlovrSettings,Plovr.Model CurrentSettings
return Plovr.Model.PlovrSettings