コード例 #1
0
 public void NotifyObservers(UpdatedInfo info)
 {
     foreach (IObserver o in observers)
     {
         o.Update(info);
     }
 }
コード例 #2
0
        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);
        }
コード例 #3
0
 public void Update(UpdatedInfo info)
 {
 }