public void postNotification(string opname, object sender, NotifyEventArgs e) { if (_dicEventHandlers.ContainsKey(opname)) { List <standardEventHandler> listHandler = _dicEventHandlers[opname]; // notification실행 도중 unregister호출하는 경우에 대비하기 위해 foreach --> for 수정(예: GraphicHTMLTextBox); int cnt = listHandler.Count; for (int i = cnt - 1; i >= 0; i--) { standardEventHandler handler = listHandler[i]; try { handler(sender, e); } catch (Exception ex) { string st = "event save exception : " + ex.ToString(); Console.WriteLine(st); Console.WriteLine(ex); } } } }
public void postNotification <T>(object sender, NotifyEventArgs e) => postNotification(typeof(T).Name, sender, e);