public virtual byte[] LoadQueuedEmailAttachmentBinary(QueuedEmailAttachment attachment) { Guard.NotNull(attachment, nameof(attachment)); if (attachment.StorageLocation == EmailAttachmentStorageLocation.Blob) { return(_storageProvider.Value.Load(attachment.ToMedia())); } return(null); }
public virtual void DeleteQueuedEmailAttachment(QueuedEmailAttachment attachment) { Guard.NotNull(attachment, nameof(attachment)); // delete from storage if (attachment.StorageLocation == EmailAttachmentStorageLocation.Blob) { _storageProvider.Value.Remove(attachment.ToMedia()); } _queuedEmailAttachmentRepository.Delete(attachment); }