Пример #1
0
 public DashboardWebApp.Models.RSU MapToRSUWithManager(DashboardWebApp.Models.Manager manager)
 {
     return(new DashboardWebApp.Models.RSU {
         Id = Id,
         IP = IPAddress.Parse(IP),
         Port = Port,
         Name = Name,
         Latitude = Latitude,
         Longitude = Longitude,
         Active = Active,
         MIBVersion = MIBVersion,
         FirmwareVersion = FirmwareVersion,
         LocationDescription = LocationDescription,
         Manufacturer = Manufacturer,
         NotificationIP = IPAddress.Parse(NotificationIP),
         NotificationPort = NotificationPort,
         Manager = manager
     });
 }
Пример #2
0
 public static RSUEditModel Parse(DashboardWebApp.Models.RSU rsu, DashboardWebApp.Models.Manager manager)
 {
     return(new RSUEditModel
     {
         Id = rsu.Id,
         IP = rsu.IP.ToString(),
         Port = rsu.Port,
         Name = rsu.Name,
         Latitude = rsu.Latitude,
         Longitude = rsu.Longitude,
         Active = rsu.Active,
         MIBVersion = rsu.MIBVersion,
         FirmwareVersion = rsu.FirmwareVersion,
         LocationDescription = rsu.LocationDescription,
         Manufacturer = rsu.Manufacturer,
         NotificationIP = rsu.NotificationIP.ToString(),
         NotificationPort = rsu.NotificationPort,
         ManagerIP = manager.IP.ToString(),
         ManagerPort = manager.Port,
         prevMIP = manager.IP.ToString(),
         prevMPort = manager.Port
     });
 }