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
Показать файл Открыть проект

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

Свойство Тип Описание
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