Class OpenOrRefreshResultItem<T>
An implementation of OpenOrRefreshResultItem that works with a specific type
T of the result type to be processed for a task
This handler will open, or refresh, each entity type/id specified as being part of the results of a task so the user can see those items immediately as being data this task updated
Inheritance
Inherited Members
Namespace: LemonEdge.Client.Core.Tasks
Assembly: LemonEdge.ClientCore.dll
Syntax
public abstract class OpenOrRefreshResultItem<T> : OpenOrRefreshResultItem, IClientTaskResultHandler, ITaskResultHandler where T : ServerTaskResult
Type Parameters
| Name | Description |
|---|---|
| T | The servertask result type that this class handles for a task |
Constructors
OpenOrRefreshResultItem()
Declaration
protected OpenOrRefreshResultItem()
Methods
ConvertRawResultIntoResult(ServerTaskParameter, object)
Calls ConvertRawResultIntoResultType(ServerTaskParameter, object) which returns a type
T instead
Declaration
protected override sealed Task<ServerTaskResult> ConvertRawResultIntoResult(ServerTaskParameter parameter, object rawResult)
Parameters
| Type | Name | Description |
|---|---|---|
| ServerTaskParameter | parameter | The parameter that was used to run the task |
| object | rawResult | The raw result of running the task |
Returns
| Type | Description |
|---|---|
| Task<ServerTaskResult> | A conversion of the raw task result into |
Overrides
ConvertRawResultIntoResultType(ServerTaskParameter, object)
Must be implemented by a derived type to convert the raw task result into type T
Declaration
protected abstract Task<T> ConvertRawResultIntoResultType(ServerTaskParameter parameter, object rawResult)
Parameters
| Type | Name | Description |
|---|---|---|
| ServerTaskParameter | parameter | The parameter that was used to run the task |
| object | rawResult | The raw result of running the task |
Returns
| Type | Description |
|---|---|
| Task<T> | A conversion of the raw task result into type |
GetItemToOpenOrRefresh(SerializedParam)
Calls GetItemToOpenOrRefresh(T) converting the result type into the expected type
T
You must override either the GetItemToOpenOrRefresh(T) or the GetItemsToOpenOrRefresh(T) method
Declaration
protected override sealed (Guid TypeID, Guid ID) GetItemToOpenOrRefresh(SerializedParam resultInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedParam | resultInfo | The result of the task that this is handling that should be of type |
Returns
| Type | Description |
|---|---|
| (Guid TypeID, Guid ID) | The single entity type/id item that should be handled by this class |
Overrides
GetItemToOpenOrRefresh(T)
Should be implemented by a derived type to retrieve the entity type/id for a single item that must be opened or refreshed by this handler
You must override either the GetItemsToOpenOrRefresh(T) or the GetItemToOpenOrRefresh(T) method
Declaration
protected virtual (Guid TypeID, Guid ID) GetItemToOpenOrRefresh(T resultInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| T | resultInfo | The result of the task that this is handling |
Returns
| Type | Description |
|---|---|
| (Guid TypeID, Guid ID) | The single entity type/id item that should be handled by this class |
GetItemsToOpenOrRefresh(SerializedParam)
Calls GetItemsToOpenOrRefresh(T)(T) converting the result type into the expected type
T
You must override either the GetItemToOpenOrRefresh(T) or the GetItemsToOpenOrRefresh(T) method
Declaration
protected override sealed IEnumerable<(Guid TypeID, Guid ID)> GetItemsToOpenOrRefresh(SerializedParam resultInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedParam | resultInfo | The result of the task that this is handling that should be of type |
Returns
| Type | Description |
|---|---|
| IEnumerable<(Guid TypeID, Guid ID)> | All entity type/id items that should be handled by this class |
Overrides
GetItemsToOpenOrRefresh(T)
Should be implemented by a derived type to retrieve the entity type/id for all items that must be opened or refreshed by this handler
You must override either the GetItemToOpenOrRefresh(T) or the GetItemsToOpenOrRefresh(T) method
Declaration
protected virtual IEnumerable<(Guid TypeID, Guid ID)> GetItemsToOpenOrRefresh(T resultInfo)
Parameters
| Type | Name | Description |
|---|---|---|
| T | resultInfo | The result of the task that this is handling |
Returns
| Type | Description |
|---|---|
| IEnumerable<(Guid TypeID, Guid ID)> | All entity type/id items that should be handled by this class |
ProcessPriorToOpeningResult(SerializedParam)
Calls ProcessPriorToOpeningResult(T) converting the param into the correct type
T
Declaration
protected override sealed void ProcessPriorToOpeningResult(SerializedParam param)
Parameters
| Type | Name | Description |
|---|---|---|
| SerializedParam | param | The parameter that holds the result of the task to process |
Overrides
ProcessPriorToOpeningResult(T)
Provides any inheriting implementation the chance to process the rseult before this handler will open, or refresh, the result items
Declaration
protected virtual void ProcessPriorToOpeningResult(T param)
Parameters
| Type | Name | Description |
|---|---|---|
| T | param | The parameter that holds the result of the task to process |