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
Implements
Inherited Members
Namespace: LemonEdge.API.Core.Tasks.Results
Assembly: LemonEdge.API.dll
Syntax
[ServerTaskResult("19b76e60-471e-49bb-a072-9ccdc617dbff", ServerTaskResultType.Server)]
[ServerTaskResult("6CB8D870-AF80-40F4-AC31-46DF25F37CD7", ServerTaskResultType.Server)]
public class ServerImportDataResultHandler : ITaskResultHandler
Constructors
ServerImportDataResultHandler()
Declaration
public ServerImportDataResultHandler()
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 |
object | result | The result returned from processing the task, which is a list of ImportLineResultInfo |
Returns
Type | Description |
---|---|
Task<ServerTaskResult> | A ServerTaskResult holding the results of the import data task ( UNIQUE_TASK_ID) |
ProcessResult(long, ServerTaskParameter, ImportDataResult, UserInfo, IEntityRetriever, List<ImportLineResultInfo>, bool)
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(long accountID, ServerTaskParameter parameter, ImportDataResult result, UserInfo user, IEntityRetriever retriever, List<ImportLineResultInfo> importInfo, bool createdTasksProcessed)
Parameters
Type | Name | Description |
---|---|---|
long | 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 IServerTask.TaskResult |
UserInfo | user | The user the task was running under |
IEntityRetriever | retriever | A context for fetching details |
List<ImportLineResultInfo> | importInfo | The results of the import task |
bool | createdTasksProcessed | Indicates if any tasks created during importing the data (specified with AutoCreatedTaskID) have already been processed |
Returns
Type | Description |
---|---|
Task | A task indicating the completion of the operation |