Search Results for

    Show / Hide Table of Contents

    Class MultiTaskTracker

    A tracker that tracks the status of multiple tasks at once and provides a summarized view of the progress of all tasks being tracked

    Inheritance
    object
    MultiTaskTracker
    Implements
    ITaskStatusDisplayer
    Inherited Members
    object.GetType()
    object.MemberwiseClone()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: LemonEdge.Client.Core.Tasks
    Assembly: LemonEdge.ClientCore.dll
    Syntax
    public class MultiTaskTracker : ITaskStatusDisplayer

    Constructors

    MultiTaskTracker()

    Declaration
    public MultiTaskTracker()

    Properties

    CurrentStatus

    Returns status of the task if tracking one task, otherwise returns Running

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

    Header

    Returns header of the task if tracking one task, otherwise returns "Processing Parallel Tasks"

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

    MaxProgressIndex

    Throws an error, not used by a multipl task tracker

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

    Name

    Returns name of the task if tracking one task, otherwise returns ""

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

    RunningOnServer

    Returns false if any of the tasks are running locally, true otherwise

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

    ServerTaskID

    Returns id of the task if tracking one task, otherwise returns null

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

    Tasks

    A list of all the tasks being tracked

    Declaration
    public IEnumerable<ITaskStatusDisplayer> Tasks { get; }
    Property Value
    Type Description
    IEnumerable<ITaskStatusDisplayer>

    TasksTracked

    Returns the total number of internal tasks being tracked

    Declaration
    public short TasksTracked { get; }
    Property Value
    Type Description
    short

    TimeRunning

    Returns the total time running if tracking one task, otherwise returns "Multiple Tasks"

    Declaration
    public 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
    public string Tooltip { get; set; }
    Property Value
    Type Description
    string

    Methods

    Cancel()

    Cancels the task if tracking 1 task, otherwise throws an error

    Declaration
    public Task Cancel()
    Returns
    Type Description
    Task

    A task indicating the completion of the operation

    GetAllMessages(TaskMessageType)

    Throws an error, not used by a multipl task tracker

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

    GetAllProgressMesssages(short)

    Throws an error, not used by a multipl task tracker

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

    GetCurrentProgress(short)

    Returns the average of the current progress across all tasks being internally tracked

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

    The index of the progress to report

    Returns
    Type Description
    decimal

    The average of the current progress across all tasks being internally tracked

    GetProgressCurrentMessage(short)

    Returns message of the task if tracking one task, otherwise returns "Avg Progress"

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

    StopTrackingTask(ITaskStatusDisplayer)

    Informs the tracker to stop tracking the specified task and remove it from the list of tasks being tracked

    Declaration
    public void StopTrackingTask(ITaskStatusDisplayer taskTracker)
    Parameters
    Type Name Description
    ITaskStatusDisplayer taskTracker

    The task to stop tracking and remove from the list of tasks being tracked

    TrackTask(ITaskStatusDisplayer)

    Creates a new multiple task tracker with the specified initial task being tracked

    Declaration
    public void TrackTask(ITaskStatusDisplayer taskTracker)
    Parameters
    Type Name Description
    ITaskStatusDisplayer taskTracker

    The initial task being tracked by this multiple task tracker

    Events

    OnStatusChanged

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

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

    Implements

    ITaskStatusDisplayer

    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.