C# Класс Plovr.Modules.Handler

Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
CurrentProject IPlovrProject
CurrentSettings Plovr.Model.PlovrSettings

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

Метод Описание
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.

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

Метод Описание
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.

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

Метод Описание
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.

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

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

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
Результат Handler

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

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
Результат string

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

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
Результат string

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

return a root url of the plovr handler, e.g. http://localhost:9810/Plovr.NET
protected GetRootUrl ( ) : string
Результат string

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

Constructor, starts by initalizing the current project and settings properties.
protected Handler ( HttpContext context ) : System
context System.Web.HttpContext
Результат System

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

protected InitCurrentProject ( ) : void
Результат void

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

Pass a full path and convert it to an input handler path
protected ResolveInputPath ( string fullPath ) : string
fullPath string the full path to convert
Результат string

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

An abstract method, every handler will implement this function and will be called after alll common pre-processing has occured.
public abstract Run ( ) : void
Результат void

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

Show the resposne with the html content type.
protected ShowHtmlResponse ( string response ) : void
response string
Результат void

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

Show a file in the response and set the content type as javascript.
protected ShowJavaScriptFileResponse ( string file ) : void
file string the file to output
Результат void

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

Show the response with a javascript content type.
protected ShowJavaScriptResponse ( string response ) : void
response string the output
Результат void

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

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
Результат void

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

Convert closure compiler messages to JSON.
protected ToJson ( List output ) : string
output List the message output from the closure compiler
Результат string

Описание свойств

CurrentProject защищенное свойство

the current project settings that are loaded
protected IPlovrProject CurrentProject
Результат IPlovrProject

CurrentSettings защищенное свойство

the current settings for plovr
protected PlovrSettings,Plovr.Model CurrentSettings
Результат Plovr.Model.PlovrSettings