Class ReportingTask
Represents a long-running background activity that may display progress and messages to the user as it executes.
Implements
Inherited Members
Namespace: Algenta.Colectica.ViewModel
Assembly: Algenta.Colectica.ViewModel.dll
Syntax
public class ReportingTask : NotificationObject, INotifyPropertyChanged
Constructors
ReportingTask(string)
Initializes a new instance of the ReportingTask class.
Declaration
public ReportingTask(string name)
Parameters
Type | Name | Description |
---|---|---|
string | name | The name of the task. |
Properties
IsActive
Gets a value indicating whether the task is currently running.
Declaration
public bool IsActive { get; }
Property Value
Type | Description |
---|---|
bool |
Message
Gets or sets a message about the task.
Declaration
public string Message { get; set; }
Property Value
Type | Description |
---|---|
string |
Name
Gets or sets the name of the task.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
string |
Progress
Gets or sets the current percentage (0 - 100) of completeness.
Declaration
public int Progress { get; set; }
Property Value
Type | Description |
---|---|
int |
Status
Gets or sets the current status of the task.
Declaration
public string Status { get; set; }
Property Value
Type | Description |
---|---|
string |
Task
Gets or sets the Task that is executing the activity.
Declaration
public Task Task { get; set; }
Property Value
Type | Description |
---|---|
Task |
Methods
StartNew(Action)
Creates and starts a new task.
Declaration
public Task StartNew(Action action)
Parameters
Type | Name | Description |
---|---|---|
Action | action | The method to be executed. |
Returns
Type | Description |
---|---|
Task | The Task object that will run in the background. |