Interface ITaskStatusDisplayer
This interface is for the client being able to display the progress of a locally or remotely executing IServerTask
Namespace: LemonEdge.Client.Core.Tasks
Assembly: ClientCore.dll
Syntax
public interface ITaskStatusDisplayer
Properties
CurrentStatus
Returns the current status of the underlying task being tracked
Declaration
ServerTaskStatus CurrentStatus { get; }
Property Value
Type | Description |
---|---|
ServerTaskStatus |
Header
Returns the header of the task being tracked
Declaration
string Header { get; }
Property Value
Type | Description |
---|---|
System.String |
MaxProgressIndex
Indicates the maximum progress index used for reporting by the task so far
Declaration
short MaxProgressIndex { get; }
Property Value
Type | Description |
---|---|
System.Int16 |
Name
Returns the name of the task being tracked
Declaration
string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
RunningOnServer
True if the underlying task being tracked is running on the server
Declaration
bool RunningOnServer { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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 |
---|---|
System.Nullable<System.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 |
---|---|
System.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 |
---|---|
System.String |
Methods
Cancel()
Cancel the task (or all tasks) being tracked by setting Cancel to true
Declaration
Task Cancel()
Returns
Type | Description |
---|---|
System.Threading.Tasks.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 |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITaskMessage>> | The history of all progress messages for all indexes for the specified message type |
GetAllProgressMesssages(Int16)
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 |
---|---|---|
System.Int16 | progressIndex | The index of the messages to report |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<ITaskMessage>> | The history of all progress messages for the specified index for the task so far |
GetCurrentProgress(Int16)
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 |
---|---|---|
System.Int16 | progressIndex | The index of the progress to report |
Returns
Type | Description |
---|---|
System.Decimal | The current progress of the specified index |
GetProgressCurrentMessage(Int16)
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 |
---|---|---|
System.Int16 | progressIndex | The index of the message to report |
Returns
Type | Description |
---|---|
System.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 |
---|---|
System.EventHandler<System.EventArgs> |