using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Tango.BL.Entities; using Tango.Telemetry.Telemetries; namespace Tango.Telemetry.Mappers { public class MachineUpdateMapper { public static TelemetryMachineUpdate MapMachineUpdate(TangoUpdate update) { TelemetryMachineUpdate tUpdate = new TelemetryMachineUpdate(); tUpdate.Time = update.LastUpdated; tUpdate.ID = update.Guid; tUpdate.StartTime = update.StartDate; tUpdate.EndTime = update.EndDate; tUpdate.ApplicationVersion = update.ApplicationVersion; tUpdate.FirmwareVersion = update.FirmwareVersion; tUpdate.VersionTag = update.ApplicationVersionTag; tUpdate.Status = update.UpdateStatus.ToString(); tUpdate.FailedReason = update.FailedReason; tUpdate.FailedLog = update.FailedLog; return tUpdate; } } }