Class ServerImportDataResultHandler
The result handler that takes a data import task (UNIQUE_TASK_ID) result and provides the client an opportunity to process it. The server implementation does nothing with the results themselves
Inheritance
Implements
Inherited Members
Namespace: LemonEdge.API.Tasks.Results
Assembly: API.dll
Syntax
[ServerTaskResult("19b76e60-471e-49bb-a072-9ccdc617dbff", ServerTaskResultType.Server)]
[ServerTaskResult("6CB8D870-AF80-40F4-AC31-46DF25F37CD7", ServerTaskResultType.Server)]
public class ServerImportDataResultHandler : ITaskResultHandler
Methods
ProcessRawResult(ITaskRunner, ServerTaskParameter, Object)
Takes the direct output of the import data task and converts it to a ImportDataResult
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 ImportDataParameter parameter the task was run with |
System.Object | result | The result returned from processing the task, which is a list of ImportLineResultInfo |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerTaskResult> | A ServerTaskResult holding the results of the import data task (UNIQUE_TASK_ID) |
ProcessResult(String, Int64, ServerTaskParameter, ImportDataResult, UserInfo, List<ImportLineResultInfo>, Boolean)
Provides the opportunity to handle the result. For this server implementation nothing is done
A client override of this behaviour could take the results and open imported items, or the task for details in the case of import failures
Declaration
protected virtual Task ProcessResult(string dbAlias, long accountID, ServerTaskParameter parameter, ImportDataResult result, UserInfo user, List<ImportLineResultInfo> importInfo, bool createdTasksProcessed)
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 ImportDataParameter the task was initialized with |
ImportDataResult | result | The result of the task process |
UserInfo | user | The user the task was running under |
System.Collections.Generic.List<ImportLineResultInfo> | importInfo | The results of the import task |
System.Boolean | createdTasksProcessed | Indicates if any tasks created during importing the data (specified with AutoCreatedTaskID) have already been processed |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |