public string Add(object action) { if (!Enabled) { return(string.Empty); } var history = new ActionHistory(action); Histories.Add(history); SendHistory?.Invoke(history); return(history.Id); }
public void Add(string id, string description) { if (!Enabled) { return; } var history = new ActionHistory() { Id = id, Description = description, Timestamp = DateTime.UtcNow }; var originalAction = Histories.Where(j => j.Id == id).FirstOrDefault(); if (originalAction != null) { history.ActionType = originalAction.ActionType; Histories.Add(history); SendHistory?.Invoke(history); } }