public static PointResponse CreatePointResponse(this IPoint point, Exception ex) { PointResponse result = point.CreatePointResponse(); result.Error = true; result.Message = ex.Message; return(result); }
public static PointResponse CreatePointResponse(this IPoint point) { PointResponse result = new PointResponse { Error = false, Message = string.Empty, PointID = 0, BlockID = 0, StartTime = DateTime.Now }; if (point != null) { result.BlockID = point.BlockID; result.PointID = point.PointID; } return(result); }