public void NotifyObservers(UpdatedInfo info) { foreach (IObserver o in observers) { o.Update(info); } }
public void Update(UpdatedInfo ob) { string message = ob.newRow == null ? ob.newColumn == null ? ob.updatedValue == null ? null : $"{DateTime.Now} The value of a cell [{ob.updatedRowIndex}, {ob.updatedColumnIndex}] has been updated to {ob.updatedValue}.\n" : $"{DateTime.Now} A new column has been added to the index {ob.newColumn}.\n" : $"{DateTime.Now} A new row has been added to the index {ob.newRow}.\n"; log.Add(message); }
public void Update(UpdatedInfo info) { }