using BackupAndImport.ECO.Events; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BackupAndImport.ECO { public class EventLog { /// /// 日志事件 /// public static event EventHandler LogEvent; public static void OnEvent(object sender, string log) { OnEvent(sender, new LogEvent(log)); } /// /// 输出日志 /// internal static void OnEvent(object sender, LogEvent e) { if (LogEvent != null) { LogEvent.Invoke(sender, e); } } } }