示例#1
0
        /// <summary>
        /// Converts this instance of <see cref="SendingApplicationDto"/> to an instance of <see cref="SendingApplication"/>.
        /// </summary>
        /// <param name="dto"><see cref="SendingApplicationDto"/> to convert.</param>
        public static SendingApplication ToEntity(this SendingApplicationDto dto)
        {
            if (dto == null)
            {
                return(null);
            }

            var entity = new SendingApplication();

            entity.SendingApplicationId   = dto.SendingApplicationId;
            entity.SendingApplicationName = dto.SendingApplicationName;
            entity.SendingApplicationIcon = dto.SendingApplicationIcon;

            dto.OnEntity(entity);

            return(entity);
        }
示例#2
0
        /// <summary>
        /// Converts this instance of <see cref="SendingApplication"/> to an instance of <see cref="SendingApplicationDto"/>.
        /// </summary>
        /// <param name="entity"><see cref="SendingApplication"/> to convert.</param>
        public static SendingApplicationDto ToDto(this SendingApplication entity)
        {
            if (entity == null)
            {
                return(null);
            }

            var dto = new SendingApplicationDto();

            dto.SendingApplicationId   = entity.SendingApplicationId;
            dto.SendingApplicationName = entity.SendingApplicationName;
            dto.SendingApplicationIcon = entity.SendingApplicationIcon;

            entity.OnDto(dto);

            return(dto);
        }
示例#3
0
 /// <summary>
 /// Invoked when <see cref="ToEntity"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="SendingApplicationDto"/> converted from <see cref="SendingApplication"/>.</param>
 /// <param name="entity"><see cref="SendingApplication"/> converted from <see cref="SendingApplicationDto"/>.</param>
 static partial void OnEntity(this SendingApplicationDto dto, SendingApplication entity);
示例#4
0
 /// <summary>
 /// Invoked when <see cref="ToDto"/> operation is about to return.
 /// </summary>
 /// <param name="dto"><see cref="SendingApplicationDto"/> converted from <see cref="SendingApplication"/>.</param>
 /// <param name="entity"><see cref="SendingApplication"/> converted from <see cref="SendingApplicationDto"/>.</param>
 static partial void OnDto(this SendingApplication entity, SendingApplicationDto dto);
示例#5
0
        /// <summary>
        /// Invoked when <see cref="ToEntity"/> operation is about to return.
        /// </summary>
        /// <param name="dto"><see cref="SendingApplicationDto"/> converted from <see cref="SendingApplication"/>.</param>
        /// <param name="entity"><see cref="SendingApplication"/> converted from <see cref="SendingApplicationDto"/>.</param>
partial         static void OnEntity(this SendingApplicationDto dto, SendingApplication entity);
示例#6
0
        /// <summary>
        /// Converts this instance of <see cref="SendingApplicationDto"/> to an instance of <see cref="SendingApplication"/>.
        /// </summary>
        /// <param name="dto"><see cref="SendingApplicationDto"/> to convert.</param>
        public static SendingApplication ToEntity(this SendingApplicationDto dto)
        {
            if (dto == null) return null;

            var entity = new SendingApplication();

            entity.SendingApplicationId = dto.SendingApplicationId;
            entity.SendingApplicationName = dto.SendingApplicationName;
            entity.SendingApplicationIcon = dto.SendingApplicationIcon;

            dto.OnEntity(entity);

            return entity;
        }
示例#7
0
 static partial void OnDto(this SendingApplication entity, SendingApplicationDto dto)
 {
     dto.NotificationTypes = (List <NotificationTypeDto>)entity.NotificationTypes.ToDtos();
     dto.Subscribers       = (List <SubscriberDto>)entity.Subscribers.ToDtos();
 }