Example #1
0
 public SavedImage(SourceQualifiedImageId id, IImagePersistence imagePersistence)
 {
     _imagePersistence = imagePersistence;
     Id = id;
 }
Example #2
0
        public async Task <ISavedImage> SaveImage(SourceQualifiedImageId id, Func <Task <Stream> > getImageStream)
        {
            await _imagePersistence.SaveImage(id.SourceId.Value, id.ImageId.Value, getImageStream, _logger);

            return(LoadImage(id));
        }
Example #3
0
 public ISavedImage LoadImage(SourceQualifiedImageId id)
 {
     return(new SavedImage(id, _imagePersistence));
 }
Example #4
0
 protected bool Equals(SourceQualifiedImageId other)
 {
     return(Equals(SourceId, other.SourceId) && Equals(ImageId, other.ImageId));
 }