C# Class Kamsar.WebConsole.WebConsole

Implements a basic WebConsole in HTML snippets. When using this class you're responsible for wrapping HTML and making sure the console output is emitted at a proper location.
Inheritance: IProgressStatus
Mostra file Open project: kamsar/Kamsar.WebConsole

Public Methods

Method Description
Render ( ) : void

Renders all WebConsole components. If some components have already been rendered individually, they will not be rendered again.

RenderConsole ( ) : void

Renders the output console portion of the WebConsole.

RenderProgressBar ( ) : void

Renders the progress bar portion of the WebConsole.

RenderResources ( ) : void

Renders the required CSS and JS for the WebConsole. Resources are stored as WebResources.

SetProgress ( int percent ) : void

Sets the percentage complete display

SetProgress ( long itemsProcessed, long totalItems ) : void

Sets the percentage complete display, given a proportion of completeness

SetTransientStatus ( string statusMessage ) : void

Writes a progress status message to the status line beneath the progress bar.

WebConsole ( HttpResponse response ) : System
WebConsole ( HttpResponse response, bool forceBuffer ) : System
WebConsole ( System.Web.HttpResponseBase response ) : System
WebConsole ( System.Web.HttpResponseBase response, bool forceBuffer ) : System
Write ( string statusMessage ) : void

Writes a message to the WebConsole's console output

Write ( string statusMessage, MessageType type ) : void

Writes a message to the WebConsole's console output

WriteException ( Exception exception ) : void

Writes an exception to the WebConsole's console output. Execution continues after the write completes.

WriteLine ( string statusMessage ) : void

Writes a message, followed by an end-line, to the WebConsole's console output

WriteLine ( string statusMessage, MessageType type ) : void

Writes a message, followed by an end-line, to the WebConsole's console output

WriteScript ( string script ) : void

Writes and executes a JavaScript statement on the console page. You don't need script tags, only JS content.

Private Methods

Method Description
IProgressStatus ( Exception exception ) : void
IProgressStatus ( int percent ) : void
IProgressStatus ( string statusMessage ) : void
IProgressStatus ( string statusMessage, MessageType type ) : void
WriteInnerException ( Exception innerException, StringBuilder exMessage ) : void

Method Details

Render() public method

Renders all WebConsole components. If some components have already been rendered individually, they will not be rendered again.
public Render ( ) : void
return void

RenderConsole() public method

Renders the output console portion of the WebConsole.
public RenderConsole ( ) : void
return void

RenderProgressBar() public method

Renders the progress bar portion of the WebConsole.
public RenderProgressBar ( ) : void
return void

RenderResources() public method

Renders the required CSS and JS for the WebConsole. Resources are stored as WebResources.
public RenderResources ( ) : void
return void

SetProgress() public method

Sets the percentage complete display
public SetProgress ( int percent ) : void
percent int
return void

SetProgress() public method

Sets the percentage complete display, given a proportion of completeness
public SetProgress ( long itemsProcessed, long totalItems ) : void
itemsProcessed long
totalItems long
return void

SetTransientStatus() public method

Writes a progress status message to the status line beneath the progress bar.
public SetTransientStatus ( string statusMessage ) : void
statusMessage string
return void

WebConsole() public method

public WebConsole ( HttpResponse response ) : System
response System.Web.HttpResponse
return System

WebConsole() public method

public WebConsole ( HttpResponse response, bool forceBuffer ) : System
response System.Web.HttpResponse
forceBuffer bool
return System

WebConsole() public method

public WebConsole ( System.Web.HttpResponseBase response ) : System
response System.Web.HttpResponseBase
return System

WebConsole() public method

public WebConsole ( System.Web.HttpResponseBase response, bool forceBuffer ) : System
response System.Web.HttpResponseBase
forceBuffer bool
return System

Write() public method

Writes a message to the WebConsole's console output
public Write ( string statusMessage ) : void
statusMessage string
return void

Write() public method

Writes a message to the WebConsole's console output
public Write ( string statusMessage, MessageType type ) : void
statusMessage string
type MessageType
return void

WriteException() public method

Writes an exception to the WebConsole's console output. Execution continues after the write completes.
public WriteException ( Exception exception ) : void
exception System.Exception
return void

WriteLine() public method

Writes a message, followed by an end-line, to the WebConsole's console output
public WriteLine ( string statusMessage ) : void
statusMessage string
return void

WriteLine() public method

Writes a message, followed by an end-line, to the WebConsole's console output
public WriteLine ( string statusMessage, MessageType type ) : void
statusMessage string
type MessageType
return void

WriteScript() public method

Writes and executes a JavaScript statement on the console page. You don't need script tags, only JS content.
public WriteScript ( string script ) : void
script string
return void