// This method implements an interface method in the supplierPushInterface class (in autogenerated supplierPush.cs file) // // Ideally, this method should not return anything, but the supplierPushInterface in the autogenerated supplierPush.cs demands it // public putDatex2DataResponse putDatex2Data(putDatex2DataRequest request) { lock (syncLock) { try { D2LogicalModel d2LogicalModel = request.d2LogicalModel; string feedType = d2LogicalModel.payloadPublication.feedType; if (feedType.Contains("ANPR Journey Time Data")) { anprTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("MIDAS Loop Traffic Data")) { midasTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("TMU Loop Traffic Data")) { tmuTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("Fused Sensor-only PTD")) { fusedSensorOnlyTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("Fused FVD and Sensor PTD")) { fusedFvdAndSensorTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("VMS and Matrix Signal Status Data")) { vmsDataService.Handle(d2LogicalModel); } else if (feedType.Contains("NTIS Model Update Notification")) { ntisModelNotificationService.Handle(d2LogicalModel); } else if (feedType.Contains("Event Data")) { eventDataService.Handle(d2LogicalModel); } else { throw new Exception("Unrecognised feed type"); } } catch (Exception e) { log.Info(e.Message); throw e; } } // Return the message sent return new putDatex2DataResponse(request.d2LogicalModel); }
// This method implements an interface method in the supplierPushInterface class (in autogenerated supplierPush.cs file) // // Ideally, this method should not return anything, but the supplierPushInterface in the autogenerated supplierPush.cs demands it // public putDatex2DataResponse putDatex2Data(putDatex2DataRequest request) { int hhh = 1; lock (syncLock) { try { D2LogicalModel d2LogicalModel = request.d2LogicalModel; string feedType = d2LogicalModel.payloadPublication.feedType; if (feedType.Contains("ANPR Journey Time Data")) { anprTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("MIDAS Loop Traffic Data")) { midasTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("TMU Loop Traffic Data")) { tmuTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("Fused Sensor-only PTD")) { fusedSensorOnlyTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("Fused FVD and Sensor PTD")) { fusedFvdAndSensorTrafficDataService.Handle(d2LogicalModel); } else if (feedType.Contains("VMS and Matrix Signal Status Data")) { vmsDataService.Handle(d2LogicalModel); } else if (feedType.Contains("NTIS Model Update Notification")) { ntisModelNotificationService.Handle(d2LogicalModel); } else if (feedType.Contains("Event Data")) { eventDataService.Handle(d2LogicalModel); } else { throw new Exception("Unrecognised feed type"); } } catch (Exception e) { log.Info(e.Message); throw e; } } // Return the message sent return(new putDatex2DataResponse(request.d2LogicalModel)); }
public putDatex2DataResponse putDatex2Data(putDatex2DataRequest request) { try { D2LogicalModel d2LogicalModel = request.d2LogicalModel; string feedType = d2LogicalModel.payloadPublication.feedType; if (feedType.Contains("ANPR Journey Time Data")) { return(anprTrafficDataService.GetDeliverAnprTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("MIDAS Loop Traffic Data")) { return(midasTrafficDataService.GetDeliverMidasTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("TMU Loop Traffic Data")) { return(tmuTrafficDataService.GetDeliverTMUTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("Fused Sensor-only PTD")) { return(SensorTrafficDataService.GetDeliverSensorTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("Fused FVD and Sensor PTD")) { return(fvdTrafficDataService.GetDeliverFVDTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("VMS and Matrix Signal Status Data")) { return(vmsDataService.GetDeliverVMSTrafficDataResponse(d2LogicalModel)); } else if (feedType.Contains("NTIS Model Update Notification")) { return(ntisModelNotificationService.GetNtisModelNotificationDataResponse(d2LogicalModel)); } else { throw new Exception("Unrecognised feed type"); } } catch (Exception e) { log.Info(e.Message); throw e; } }
public putDatex2DataResponse putDatex2Data(putDatex2DataRequest request) { try { D2LogicalModel d2LogicalModel = request.d2LogicalModel; string feedType = d2LogicalModel.payloadPublication.feedType; if (feedType.Contains("ANPR Journey Time Data")) { return anprTrafficDataService.GetDeliverAnprTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("MIDAS Loop Traffic Data")) { return midasTrafficDataService.GetDeliverMidasTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("TMU Loop Traffic Data")) { return tmuTrafficDataService.GetDeliverTMUTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("Fused Sensor-only PTD")) { return SensorTrafficDataService.GetDeliverSensorTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("Fused FVD and Sensor PTD")) { return fvdTrafficDataService.GetDeliverFVDTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("VMS and Matrix Signal Status Data")) { return vmsDataService.GetDeliverVMSTrafficDataResponse(d2LogicalModel); } else if (feedType.Contains("NTIS Model Update Notification")) { return ntisModelNotificationService.GetNtisModelNotificationDataResponse(d2LogicalModel); } else { throw new Exception("Unrecognised feed type"); } } catch (Exception e) { log.Info(e.Message); throw e; } }