示例#1
0
        public void ResizePicture(PictureId pictureId, PictureSize newSize)
        {
            var picture = FindPicture(pictureId);

            if (picture == null)
            {
                throw new InvalidOperationException("Cannot resize a picture that I dont't have");
            }
            picture.Resize(newSize);
        }
示例#2
0
 private Picture FindPicture(PictureId id)
 {
     return(Pictures.FirstOrDefault(t => t.Id == id));
 }