Class CompareDatabaseResultHandler
The result handler that takes a database comparer 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("1B830EBD-35B2-4400-9A04-A21A48FC2CFB", ServerTaskResultType.Server)]
public class CompareDatabaseResultHandler : ITaskResultHandler
Fields
DBCOMPARE_FILE_FOLDER
The folder used to store the database comparrison file in
Declaration
public const string DBCOMPARE_FILE_FOLDER = "DBCompare"
Field Value
Type | Description |
---|---|
System.String |
Methods
ProcessRawResult(ITaskRunner, ServerTaskParameter, Object)
Takes the direct output of the database comparrison task and converts it to a CompareDatabaseResults
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 CompareDatabaseParameters parameter the task was run with |
System.Object | result | The result returned from processing the task, which is a string builder holding any differences found between the databases |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<ServerTaskResult> | A CompareDatabaseResults holding the results of the database comparer task (UNIQUE_TASK_ID) |
ProcessResult(String, Int64, ServerTaskParameter, CompareDatabaseResults, UserInfo, StringBuilder)
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, CompareDatabaseResults result, UserInfo user, StringBuilder 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 CompareDatabaseParameters the task was initialized with |
CompareDatabaseResults | result | The result of the task process |
UserInfo | user | The user the task was running under |
System.Text.StringBuilder | compressedFile | The file results |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task | A task indicating the completion of the operation |