コード例 #1
0
        /// <summary>
        /// Converts this instance of <see cref="nodedatabasestatus"/> to an instance of <see cref="nodedatabasestatusDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="nodedatabasestatus"/> to convert.</param>
        public static nodedatabasestatusDto ToDTO(this nodedatabasestatus entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new nodedatabasestatusDto();

            dto.i_NodeId = entity.i_NodeId;
            dto.v_CurrentDatabaseVersion  = entity.v_CurrentDatabaseVersion;
            dto.v_PreviousDatabaseVersion = entity.v_PreviousDatabaseVersion;
            dto.i_CurrentDatabaseStatus   = entity.i_CurrentDatabaseStatus;
            dto.d_LastDatabaseUpgrade     = entity.d_LastDatabaseUpgrade;
            dto.d_LastDatabaseDataSync    = entity.d_LastDatabaseDataSync;

            entity.OnDTO(dto);

            return(dto);
        }
コード例 #2
0
        /// <summary>
        /// Converts this instance of <see cref="nodedatabasestatusDto"/> to an instance of <see cref="nodedatabasestatus"/>.
        /// </summary>
        /// <param name="dto"><see cref="nodedatabasestatusDto"/> to convert.</param>
        public static nodedatabasestatus ToEntity(this nodedatabasestatusDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new nodedatabasestatus();

            entity.i_NodeId = dto.i_NodeId;
            entity.v_CurrentDatabaseVersion  = dto.v_CurrentDatabaseVersion;
            entity.v_PreviousDatabaseVersion = dto.v_PreviousDatabaseVersion;
            entity.i_CurrentDatabaseStatus   = dto.i_CurrentDatabaseStatus;
            entity.d_LastDatabaseUpgrade     = dto.d_LastDatabaseUpgrade;
            entity.d_LastDatabaseDataSync    = dto.d_LastDatabaseDataSync;

            dto.OnEntity(entity);

            return(entity);
        }
コード例 #3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="entity"><see cref="nodedatabasestatus"/> converted from <see cref="nodedatabasestatusDto"/>.</param>
 static partial void OnEntity(this nodedatabasestatusDto dto, nodedatabasestatus entity);
コード例 #4
0
 /// <summary>
 /// Invoked when <see cref="ToDTO"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="nodedatabasestatusDto"/> converted from <see cref="nodedatabasestatus"/>.</param>
 static partial void OnDTO(this nodedatabasestatus entity, nodedatabasestatusDto dto);