public static PlanningAction GetCurrentAction(this IPlanExecution execution) { if (!execution.Status.IsCurrentActionAvailable()) { throw new InvalidOperationException( $"Current action cannot be retrieved when plan execution status is {execution.Status}" ); } return(execution.Plan.Actions.ElementAt(execution.CurrentActionIndex)); }
public ExecutableBackupPlan(BackupPlan backupPlan, IPlanExecution execution, IPlanExecutionEvents events) { BackupPlan = backupPlan; Execution = execution; Events = events; }