Search Results for

    Show / Hide Table of Contents

    Interface ITaskStatusDisplayer

    This interface is for the client being able to display the progress of a locally or remotely executing IServerTask

    Namespace: LemonEdge.Client.UI.API.Tasks
    Assembly: LemonEdge.Client.UI.API.dll
    Syntax
    public interface ITaskStatusDisplayer

    Properties

    CurrentStatus

    Returns the current status of the underlying task being tracked

    Declaration
    ServerTaskStatusEnum CurrentStatus { get; }
    Property Value
    Type Description
    ServerTaskStatusEnum

    Header

    Returns the header of the task being tracked

    Declaration
    string Header { get; }
    Property Value
    Type Description
    string

    MaxProgressIndex

    Indicates the maximum progress index used for reporting by the task so far

    Declaration
    short MaxProgressIndex { get; }
    Property Value
    Type Description
    short

    Name

    Returns the name of the task being tracked

    Declaration
    string Name { get; }
    Property Value
    Type Description
    string

    RunningOnServer

    True if the underlying task being tracked is running on the server

    Declaration
    bool RunningOnServer { get; }
    Property Value
    Type Description
    bool

    ServerTaskID

    Returns the unique ID of the IServerTask being tracked.

    Can be null if this isn't tracking a single task but is actually tracking multiple tasks

    Declaration
    Guid? ServerTaskID { get; }
    Property Value
    Type Description
    Guid?

    TimeRunning

    A user friendly message of how long the task took to run, or how long it has currenty been running for

    Declaration
    string TimeRunning { get; }
    Property Value
    Type Description
    string

    Tooltip

    A user friendly tooltip for the currently tracked task containing header info, status and the percentage progress

    Declaration
    string Tooltip { get; set; }
    Property Value
    Type Description
    string

    Methods

    Cancel()

    Cancel the task (or all tasks) being tracked by setting Cancel to true

    Declaration
    Task Cancel()
    Returns
    Type Description
    Task

    A task indicating the completion of the message. This only indicates the task is being set to cancel, the task itself still needs to respond to the request

    GetAllMessages(TaskMessageType)

    Returns the history of all progress messages for all indexes for the specified message type

    Declaration
    Task<IEnumerable<ITaskMessage>> GetAllMessages(TaskMessageType type)
    Parameters
    Type Name Description
    TaskMessageType type

    The type of reported messages to return

    Returns
    Type Description
    Task<IEnumerable<ITaskMessage>>

    The history of all progress messages for all indexes for the specified message type

    GetAllProgressMesssages(short)

    Returns the history of all progress messages for the specified index for the task so far

    Declaration
    Task<IEnumerable<ITaskMessage>> GetAllProgressMesssages(short progressIndex = 0)
    Parameters
    Type Name Description
    short progressIndex

    The index of the messages to report

    Returns
    Type Description
    Task<IEnumerable<ITaskMessage>>

    The history of all progress messages for the specified index for the task so far

    GetCurrentProgress(short)

    Returns the current progress for the specified index. The default, or main progress, is reported with an index of 0.

    See IProgressReporter for more information

    Declaration
    decimal GetCurrentProgress(short progressIndex = 0)
    Parameters
    Type Name Description
    short progressIndex

    The index of the progress to report

    Returns
    Type Description
    decimal

    The current progress of the specified index

    GetProgressCurrentMessage(short)

    Returns the current message/status associated with the current progress for the specified index. The default, or main progress, is reported with an index of 0.

    See IProgressReporter for more information

    Declaration
    string GetProgressCurrentMessage(short progressIndex = 0)
    Parameters
    Type Name Description
    short progressIndex

    The index of the message to report

    Returns
    Type Description
    string

    The current message/staus for the associated progress of the specified index

    Events

    OnStatusChanged

    Indicates the status of the task being tracked has changed, so the UI has chance to reflect this

    Declaration
    event EventHandler<EventArgs> OnStatusChanged
    Event Type
    Type Description
    EventHandler<EventArgs>

    Extension Methods

    LinqExtensions.AsArray<T>(T)
    LinqExtensions.ToArrayOfOne<T>(T)
    LinqExtensions.ToListOfOne<T>(T)
    MiscExtensions.SetIfNotEqual<T, TP>(T, Expression<Func<T, TP>>, TP)
    WeakReferenceExtensions.WeakReference(object)
    SQLExtensions.ToSQLValue(object, bool)
    ReflectionExtensions.ClearEventInvocations(object, string)
    StringExtensions.ToCSVFormatString(object, Type)
    In this article
    Back to top © LemonEdge Technologies. All rights reserved.