예제 #1
0
        public virtual byte[] LoadQueuedEmailAttachmentBinary(QueuedEmailAttachment attachment)
        {
            Guard.NotNull(attachment, nameof(attachment));

            if (attachment.StorageLocation == EmailAttachmentStorageLocation.Blob)
            {
                return(_storageProvider.Value.Load(attachment.ToMedia()));
            }

            return(null);
        }
예제 #2
0
        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);
        }