private static void SendChangeMsg(object sender, ComponentEventArgs e) { if (!(sender is ServiceModule)) throw new ArgumentException(NOT_SERVICE_MODULE); var module = sender as ServiceModule; Console.WriteLine(EVENT_MSG_TEMPLATE, e.ComponentName, e.Action, module.ModuleName); }
private void m_DetachHandler(object sender, ComponentEventArgs e) => SendChangeMsg(sender, e);