public ActionBase(string title, string description, bool suppressHistory, bool completeImmediately, string error) { Title = title; _description = description; log.Debug(_description); if (completeImmediately) { if (!string.IsNullOrEmpty(error)) { _exception = new Exception(error); } Finished = DateTime.Now; _percentComplete = 100; _isCompleted = true; } if (!suppressHistory) { NewAction?.Invoke(this); } }
public void OnNewAction(ActionEventArgs e) { NewAction?.Invoke(this, e); }