コード例 #1
0
 public static GrpcMetric AssignTo(this GrpcMetric gMetric, ModelMetric metric)
 {
     metric.Timestamp = gMetric.CreateTime.ToDateTimeOffset();
     metric.OutputWaterCelsiusDegree           = gMetric.OutputWaterCelsiusDegree;
     metric.InputWaterCelsiusDegree            = gMetric.InputWaterCelsiusDegree;
     metric.HeaterOutputWaterCelsiusDegree     = gMetric.HeaterOutputWaterCelsiusDegree;
     metric.EnvironmentCelsiusDegree           = gMetric.EnvironmentCelsiusDegree;
     metric.OutputWaterPressureMeter           = gMetric.OutputWaterPressureMeter;
     metric.InputWaterPressureMeter            = gMetric.InputWaterPressureMeter;
     metric.HeaterPowerKilowatt                = gMetric.HeaterPowerKilowatt;
     metric.WaterPumpFlowRateCubicMeterPerHour = gMetric.WaterPumpFlowRateCubicMeterPerHour;
     return(gMetric);
 }
コード例 #2
0
 public static GrpcMetric AssignFrom(this GrpcMetric gMetric, ModelMetric metric)
 {
     gMetric.CreateTime = Timestamp.FromDateTimeOffset(metric.Timestamp);
     gMetric.OutputWaterCelsiusDegree           = metric.OutputWaterCelsiusDegree;
     gMetric.InputWaterCelsiusDegree            = metric.InputWaterCelsiusDegree;
     gMetric.HeaterOutputWaterCelsiusDegree     = metric.HeaterOutputWaterCelsiusDegree;
     gMetric.EnvironmentCelsiusDegree           = metric.EnvironmentCelsiusDegree;
     gMetric.OutputWaterPressureMeter           = metric.OutputWaterPressureMeter;
     gMetric.InputWaterPressureMeter            = metric.InputWaterPressureMeter;
     gMetric.HeaterPowerKilowatt                = metric.HeaterPowerKilowatt;
     gMetric.WaterPumpFlowRateCubicMeterPerHour = metric.WaterPumpFlowRateCubicMeterPerHour;
     return(gMetric);
 }