C# 클래스 NSoft.NFramework.FusionCharts.Web.ExportHandler

FusionCharts Exporter is an ASP.NET C# script that handles FusionCharts (since v3.1) Server Side Export feature. This in conjuncture with other resource classses would process FusionCharts Export Data POSTED to it from FusionCharts and convert the data to an image or a PDF. Subsequently, it would save to the server or respond back as an HTTP response to client side as download. This script might be called as the FusionCharts Exporter - main module
상속: IHttpHandler
파일 보기 프로젝트 열기: debop/NFramework

보호된 프로퍼티들

프로퍼티 타입 설명
DOMId string
ErrorMessages string>.IDictionary
FileSuffixFormat string
IntelligentFileNaming bool
IsDownload bool
OverwriteFile bool
rnd System.Random

공개 메소드들

메소드 설명
ProcessRequest ( HttpContext context ) : void

보호된 메소드들

메소드 설명
ExportChart ( ) : void

Chart를 Exporting하는 메인 함수입니다.

ParseExportRequestStream ( ) : Hashtable

Fusion Chart가 전송한 POST 방식의 요청 정보를 해석해서, Hashtable로 반환한다. 반환되는 Hashtable은 이미지 정보를 담은 'stream', 크기, 색상 등의 정보를 가진 'meta', 부가적인 ExportFormat, exportFileName, exportAction 정보를 담은 'parameters' 라는 키를 가집니다.

비공개 메소드들

메소드 설명
BuildResponse ( IEnumerable arrMsg ) : string

Builds response from an array of status information. Joins the array to a string. Each array element should be a string which is a key=value pair. This array are either joined by a & to build a querystring (to pass to chart) or joined by a HTML
to show neat and clean status informaton in Browser window if download fails at the processing stage.

ExportProcessor ( string strFormat, string stream, Hashtable meta ) : MemoryStream

Get Export data from and build the export binary/objct.

FlushStatus ( object filename, Hashtable meta ) : void

Exporting 상태 정보를 Chart나 Exporting 파일에 씁니다. It parses the exported status through parser function parseExportedStatus, builds proper response string using buildResponse function and flushes the response string to the output stream and terminates the program.

FlushStatus ( object filename, Hashtable meta, string msg ) : void

Exporting 상태 정보를 Chart나 Exporting 파일에 씁니다. It parses the exported status through parser function parseExportedStatus, builds proper response string using buildResponse function and flushes the response string to the output stream and terminates the program.

GenerateIntelligentFileId ( ) : string
GetExtension ( string exportType ) : string

gets file extension checking the export type.

GetMime ( string exportType ) : string

gets mime type for an export type

IsDirectoryWritable ( string path ) : bool

지정된 경로가 쓰기 가능한 Directory인지 알아본다.

OutputExportObject ( MemoryStream exportStream, Hashtable exportParams ) : bool

Checks whether the export action is download or save. If action is 'download', send export parameters to 'setupDownload' function. If action is not-'download', send export parameters to 'setupServer' function. In either case it gets exportSettings and passes the settings along with processed export binary (image/PDF) to the output handler function if the export settings return a 'ready' flag set to 'true' or 'download'. The export process would stop here if the action is 'download'. In the other case, it gets back success status from output handler function and returns it.

ParseExportedStatus ( object filename, Hashtable meta, string msg ) : IList

Parses the exported status and builds an array of export status information. As per status it builds a status array which contains statusCode (0/1), statusMesage, fileName, width, height and notice in some cases.

ParseParams ( string strParams ) : Hashtable

Parse export 'parameters' string into a Hashtable Also synchronise default values from defaultparameterValues Hashtable

SetUpDownload ( Hashtable exportParams ) : Hashtable

setup download headers and return ready flag in exportSettings

SetUpServer ( Hashtable exportParams ) : Hashtable

check server permissions and settings and return ready flag to exportSettings

ToHashtable ( string str ) : Hashtable

Helper function that splits a string containing delimiter separated key value pairs into hashtable

ToHashtable ( string str, char delimiters ) : Hashtable

Helper function that splits a string containing delimiter separated key value pairs into hashtable

WriteLogMessage ( string msg ) : void

예외정보를 발생 시킨다.

WriteLogMessage ( string msg, bool halt ) : void

예외정보를 발생 시킨다.

메소드 상세

ExportChart() 보호된 메소드

Chart를 Exporting하는 메인 함수입니다.
protected ExportChart ( ) : void
리턴 void

ParseExportRequestStream() 보호된 메소드

Fusion Chart가 전송한 POST 방식의 요청 정보를 해석해서, Hashtable로 반환한다. 반환되는 Hashtable은 이미지 정보를 담은 'stream', 크기, 색상 등의 정보를 가진 'meta', 부가적인 ExportFormat, exportFileName, exportAction 정보를 담은 'parameters' 라는 키를 가집니다.
protected ParseExportRequestStream ( ) : Hashtable
리턴 System.Collections.Hashtable

ProcessRequest() 공개 메소드

public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext
리턴 void

프로퍼티 상세

DOMId 보호되어 있는 프로퍼티

DOMId of the chart
protected string DOMId
리턴 string

ErrorMessages 보호되어 있는 정적으로 프로퍼티

protected static IDictionary ErrorMessages
리턴 string>.IDictionary

FileSuffixFormat 보호되어 있는 프로퍼티

value can be either 'TIMESTAMP' or 'RANDOM'
protected string FileSuffixFormat
리턴 string

IntelligentFileNaming 보호되어 있는 프로퍼티

protected bool IntelligentFileNaming
리턴 bool

IsDownload 보호되어 있는 프로퍼티

Whether the export action is download. default value. Would change as per setting retrieved from chart.
protected bool IsDownload
리턴 bool

OverwriteFile 보호되어 있는 프로퍼티

protected bool OverwriteFile
리턴 bool

rnd 보호되어 있는 정적으로 프로퍼티

protected static Random,System rnd
리턴 System.Random