Class ExportCSVResultHandler
The result handler that takes an export data task (UNIQUE_TASK_ID) result and stores the file in the storage system for retrieval by anyone viewing the task
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.API.Tasks.Results
Assembly: API.dll
Syntax
[ServerTaskResult("6314045e-6b89-461c-863a-d772ea59c928", ServerTaskResultType.Server)]
public class ExportCSVResultHandler : ITaskResultHandler
Methods
ProcessRawResult(ITaskRunner, ServerTaskParameter, Object)
Takes the direct output of the export data task and converts it to a ExportCSVResult
Declaration
public Task<ServerTaskResult> ProcessRawResult(ITaskRunner runner, ServerTaskParameter parameter, object result)
Parameters
Type | Name | Description |
---|---|---|
ITaskRunner | runner | The task runner this task has been running in |
ServerTaskParameter | parameter | The initial ExportCSVParameter parameter the task was run with |
System.Object | result | The result returned from processing the task, which is a byte array holding the generated csv file |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerTaskResult> | A ExportCSVResult holding the results of the export data task (UNIQUE_TASK_ID) |
ProcessResult(String, Int64, ServerTaskParameter, ExportCSVResult, UserInfo, Byte[])
Provides the opportunity to handle the result. For this server implementation the file is written to storage IStorageManager
A client override of this behaviour could take the results and directly display them to the user instead of writing them to any storage
Declaration
public virtual Task ProcessResult(string dbAlias, long accountID, ServerTaskParameter parameter, ExportCSVResult result, UserInfo user, byte[] compressedFile)
Parameters
Type | Name | Description |
---|---|---|
System.String | dbAlias | The current connected database alias the task is running against. |
System.Int64 | accountID | The current account the task was running within |
ServerTaskParameter | parameter | The original ExportCSVParameter the task was initialized with |
ExportCSVResult | result | The result of the task process |
UserInfo | user | The user the task was running under |
System.Byte[] | compressedFile | The file results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |