NoticeBus.cs
761 Bytes
using HHECS.Infrastructure.Enums;
using System;
namespace HHECS.Infrastructure.Notice
{
/// <summary>
/// 通知总线
/// </summary>
public class NoticeBus
{
#region 事件
public static event Delegates.NoticeEventHandle NoticeEvent;
public static void Notice(string content, Level logLevel, Exception exception = null)
{
NoticeEvent?.Invoke(null, NoticeEventArgs.CreateLogEventArgs(content, logLevel, exception));
}
public static void Notice(string content, Level logLevel, object sender, Exception exception = null)
{
NoticeEvent?.Invoke(sender, NoticeEventArgs.CreateLogEventArgs(content, logLevel, exception));
}
#endregion
}
}