mirror of
https://github.com/C9Glax/tranga-website.git
synced 2025-07-06 02:44:17 +02:00
Changed taskProgress increment to call method that updates progress accordingly (with parent-tasks being also updated)
This commit is contained in:
@ -21,7 +21,7 @@ public abstract class TrangaTask
|
||||
public DateTime lastExecuted { get; set; }
|
||||
public Task task { get; }
|
||||
[Newtonsoft.Json.JsonIgnore]public ExecutionState state { get; set; }
|
||||
[Newtonsoft.Json.JsonIgnore]public float progress { get; set; }
|
||||
[Newtonsoft.Json.JsonIgnore]public float progress { get; protected set; }
|
||||
[Newtonsoft.Json.JsonIgnore]public DateTime nextExecution => lastExecuted.Add(reoccurrence);
|
||||
|
||||
public enum ExecutionState
|
||||
@ -38,6 +38,12 @@ public abstract class TrangaTask
|
||||
this.task = task;
|
||||
this.progress = 0f;
|
||||
}
|
||||
|
||||
public float IncrementProgress(float amount)
|
||||
{
|
||||
this.progress += amount;
|
||||
return this.progress;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// BL for concrete Tasks
|
||||
|
Reference in New Issue
Block a user