old_flsystem/应用/BackupAndImport/ECO/EventLog.cs

33 lines
748 B
C#
Raw Permalink Normal View History

2022-09-29 10:35:00 +00:00
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
{
/// <summary>
/// 日志事件
/// </summary>
public static event EventHandler<LogEvent> LogEvent;
public static void OnEvent(object sender, string log)
{
OnEvent(sender, new LogEvent(log));
}
/// <summary>
/// 输出日志
/// </summary>
internal static void OnEvent(object sender, LogEvent e)
{
if (LogEvent != null)
{
LogEvent.Invoke(sender, e);
}
}
}
}