public IList<StatusItem> ReportStatus()
        {
            var statusItem = new StatusItem("__NAME__.Domain.Persistence");
            var repo = new MigrationsRepository(_unitOfWork);

            //Try sending a messages
            try
            {
                statusItem.Comment = $"Last migration {repo.LastMigration}";
                statusItem.Status = StatusItem.OK;
            }
            catch (Exception e)
            {
                statusItem.Status = StatusItem.Error;
                statusItem.Comment = e.Message;
            }

            return new[] { statusItem };
        }
コード例 #2
0
        public IList <StatusItem> ReportStatus()
        {
            var statusItem = new StatusItem("__NAME__.Domain.Persistence");
            var repo       = new MigrationsRepository(_unitOfWork);

            //Try sending a messages
            try
            {
                statusItem.Comment = $"Last migration {repo.LastMigration}";
                statusItem.Status  = StatusItem.OK;
            }
            catch (Exception e)
            {
                statusItem.Status  = StatusItem.Error;
                statusItem.Comment = e.Message;
            }

            return(new[] { statusItem });
        }
コード例 #3
0
 public PersistenceStatusReporter(MigrationsRepository repo)
 {
     _repo = repo;
 }