protected override void When(object @event)
 {
     switch(@event)
     {
         case PictureAdded e:
             ParentId = e.ClassifiedAdId;
             Id = new Guid(e.PictureId.ToString());
             Location = new Uri(e.Url);
             Size = new PictureSize(e.Width, e.Height);
             Order = e.Order;
             break;
         case PictureResized e:
             Size = new PictureSize(e.Width, e.Height);
             break;
     }
 }
 internal void Resize(PictureSize newSize) => 
     Apply(new PictureResized(Id, newSize.Height, newSize.Width));
Exemple #3
0
 public void ResizePicture(Guid id, PictureSize newSize) =>
 Apply(new PictureResized(id, newSize.Width, newSize.Height));