コード例 #1
0
        public static PointResponse CreatePointResponse(this IPoint point, Exception ex)
        {
            PointResponse result = point.CreatePointResponse();

            result.Error   = true;
            result.Message = ex.Message;
            return(result);
        }
コード例 #2
0
        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);
        }