public static GrpcAlarm AssignTo(this GrpcAlarm gAlarm, ModelAlarm alarm) { alarm.Timestamp = gAlarm.CreateTime.ToDateTimeOffset(); alarm.LowFlowRate = gAlarm.LowFlowRate; alarm.HighHeaterPressure = gAlarm.HighHeaterPressure; alarm.LowHeaterPressure = gAlarm.LowHeaterPressure; alarm.NoPower = gAlarm.NoPower; alarm.HeaterOverloadedBroken = gAlarm.HeaterOverloadedBroken; alarm.ElectricalHeaterBroken = gAlarm.ElectricalHeaterBroken; return(gAlarm); }
public static GrpcAlarm AssignFrom(this GrpcAlarm gAlarm, ModelAlarm alarm) { gAlarm.CreateTime = Timestamp.FromDateTimeOffset(alarm.Timestamp); gAlarm.LowFlowRate = alarm.LowFlowRate; gAlarm.HighHeaterPressure = alarm.HighHeaterPressure; gAlarm.LowHeaterPressure = alarm.LowHeaterPressure; gAlarm.NoPower = alarm.NoPower; gAlarm.HeaterOverloadedBroken = alarm.HeaterOverloadedBroken; gAlarm.ElectricalHeaterBroken = alarm.ElectricalHeaterBroken; return(gAlarm); }