示例#1
0
        /// <summary>
        /// Converts the entity into a domain model.
        /// </summary>
        /// <returns>The domain model.</returns>
        /// <param name="sharedPictureEntity">ShpiEntry entity.</param>
        internal static SharedPicture ToDomainModel(this SharedPictureEntity sharedPictureEntity)
        {
            SharedPicture sharedPicture = new SharedPicture
            {
                BitmapSize      = new Size(sharedPictureEntity.BitmapWidth, sharedPictureEntity.BitmapHeight),
                DisplayLocation = new Point(sharedPictureEntity.DisplayLocationX, sharedPictureEntity.DisplayLocationY)
            };

            return(sharedPicture);
        }
示例#2
0
        /// <summary>
        /// Converts the domain model into an entity.
        /// </summary>
        /// <returns>The entity.</returns>
        /// <param name="sharedPicture">ShpiEntry.</param>
        internal static SharedPictureEntity ToEntity(this SharedPicture sharedPicture)
        {
            SharedPictureEntity sharedPictureEntity = new SharedPictureEntity
            {
                BitmapWidth      = sharedPicture.BitmapSize.Width,
                BitmapHeight     = sharedPicture.BitmapSize.Height,
                DisplayLocationX = sharedPicture.DisplayLocation.X,
                DisplayLocationY = sharedPicture.DisplayLocation.Y
            };

            return(sharedPictureEntity);
        }