using iWareLog.ORM; using iWareLog.LOG.Entity; using iWareLog.LOG.Dao; using iWareCommon.Common.Service; namespace iWareLog.LOG.Service { public class AlertService : CommonService { private static object Lock = new object(); private AlertService() : base(AlertDao.GetInstance()) { } private static AlertService Instance = null; /// /// 获取单例的方法 /// /// log服务的单例实体 public static AlertService GetInstance() { if (Instance == null) { lock (Lock) { if (Instance == null) { Instance = new AlertService(); } } } return Instance; } } }