private void dependency_OnChange(object sender, SqlNotificationEventArgs e)
        {
            if (e.Type == SqlNotificationType.Change)
            {
                var context = GlobalHost.ConnectionManager.GetHubContext<PingResultHub>();
                PingResultRepository repo = new PingResultRepository();
                var res = repo.GetAllPingResults();
                context.Clients.All.addPingResultToPage(res);
            }

            RegisterNotification();
        }
Beispiel #2
0
 public Monitor()
 {
     _repo = new PingResultRepository();
     _appRepo = new ApplicationRepository();
     _appData = new ApplicationData();
 }
 public PingResultController()
 {
     _monitor = new Monitor();
     _repo = new PingResultRepository();
 }