public void ResizePicture(PictureId pictureId, PictureSize newSize)
        {
            var picture = FindPicture(pictureId);

            if (picture == null)
            {
                throw new InvalidOperationException("Cannot resize a picture that I don't have");
            }

            picture.Resize(newSize);
        }
Esempio n. 2
0
 private Picture FindPicture(PictureId id)
 => Pictures.FirstOrDefault(x => x.Id == id);