Search Results for

    Show / Hide Table of Contents

    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
    System.Object
    OpenOrRefreshResultItem
    OpenOrRefreshResultItem<T>
    TransactionRevertResultHandler
    Implements
    IClientTaskResultHandler
    ITaskResultHandler
    Inherited Members
    OpenOrRefreshResultItem.Init(IModelLayoutCommon)
    OpenOrRefreshResultItem.Displayer
    OpenOrRefreshResultItem.GetItemsToOpenOrRefresh(IServerTask, IServerTaskData)
    OpenOrRefreshResultItem.ProcessResult(IServerTask, IServerTaskData)
    OpenOrRefreshResultItem.ProcessRawResult(ITaskRunner, ServerTaskParameter, Object)
    System.Object.Equals(System.Object)
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetHashCode()
    System.Object.GetType()
    System.Object.MemberwiseClone()
    System.Object.ReferenceEquals(System.Object, System.Object)
    System.Object.ToString()
    Namespace: LemonEdge.Client.Core.Tasks
    Assembly: 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

    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

    System.Object rawResult

    The raw result of running the task

    Returns
    Type Description
    System.Threading.Tasks.Task<ServerTaskResult>

    A conversion of the raw task result into T which is an appropriate ServerTaskResult

    Overrides
    OpenOrRefreshResultItem.ConvertRawResultIntoResult(ServerTaskParameter, Object)

    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

    System.Object rawResult

    The raw result of running the task

    Returns
    Type Description
    System.Threading.Tasks.Task<T>

    A conversion of the raw task result into type T

    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
    System.Collections.Generic.IEnumerable<System.ValueTuple<System.Guid, System.Guid>>

    All entity type/id items that should be handled by this class

    GetItemsToOpenOrRefresh(SerializedParam)

    Calls GetItemsToOpenOrRefresh(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 T

    Returns
    Type Description
    System.Collections.Generic.IEnumerable<System.ValueTuple<System.Guid, System.Guid>>

    All entity type/id items that should be handled by this class

    Overrides
    OpenOrRefreshResultItem.GetItemsToOpenOrRefresh(SerializedParam)

    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
    System.ValueTuple<System.Guid, System.Guid>

    The single entity type/id item that should be handled by this class

    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 T

    Returns
    Type Description
    System.ValueTuple<System.Guid, System.Guid>

    The single entity type/id item that should be handled by this class

    Overrides
    OpenOrRefreshResultItem.GetItemToOpenOrRefresh(SerializedParam)

    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

    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
    OpenOrRefreshResultItem.ProcessPriorToOpeningResult(SerializedParam)

    Implements

    IClientTaskResultHandler
    ITaskResultHandler

    Extension Methods

    MiscExtensions.SetIfNotEqual<T, P>(T, Expression<Func<T, P>>, P)
    ReflectionExtensions.ClearEventInvocations(Object, String)
    StringExtensions.ToCSVFormatString(Object, Type)
    SQLExtensions.ToSQLValue(Object, Boolean)
    In This Article
    Back to top © LemonTree Software Ltd. All rights reserved.