private static void Monitor_EndpointChecked(EndpointCheckedEventArgs args) { var newStatus = new EndpointStatus() { Timestamp = args.Timestamp, StatusCode = args.StatusCode }; var endpoint = endpointRepo.Get(args.Url); if (StatusShouldBeReported(endpoint.LastStatus, newStatus)) { ReportStatus(endpoint, newStatus); } endpoint.Statuses.Add(newStatus); endpointRepo.SaveChanges(); }
private static void Monitor_EndpointChecked( EndpointCheckedEventArgs args ) { var newStatus = new EndpointStatus() { Timestamp = args.Timestamp, StatusCode = args.StatusCode }; var endpoint = endpointRepo.Get( args.Url ); if ( StatusShouldBeReported( endpoint.LastStatus, newStatus ) ) { ReportStatus( endpoint, newStatus ); } endpoint.Statuses.Add( newStatus ); endpointRepo.SaveChanges(); }