-
I wonder why the BodyAsMimeMessage property is defined as an object and not as some Interface. There is an IMimeKitUtils method GetBodyParts that accepts an object but that method returns the bodyparts as a list of objects. But how can you call this method in custom code (TypeLoader is internal) and how can you retrieve the FileName without using reflection? Something like: Response.Create()
.WithCallback(request =>
{
// How to retrieve FileName from request.BodyAsMimeMessage?
var fileName = request.BodyAsMimeMessage.GetBodyParts[0].FileName;
// More custom code and return some response...
return new ResponseMessage { StatusCode = 200 };
}) |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 5 replies
-
It is complicated... I moved all mimekit logic to a new optional project. And I made all mimekit classes internal to avoid problems with mimekitlite and mimekit. This means that also casting that object to the original mimekit interface is not possible anymore. But maybe because I made a new project, option 2 is not needed anymore. I need to think on this... |
Beta Was this translation helpful? Give feedback.
-
The current implementation of request.BodyAsMimeMessage is using that concept of hiding mimekit but instead instead of returning an (almost unusable) object-instance you could return a instance of a (new?) class containing (some?) relevant info retrieved from the internal created mimekit/mimekitlight instance. This implementation can be put in the optional project. |
Beta Was this translation helpful? Give feedback.
-
A new version will be released shortly. |
Beta Was this translation helpful? Give feedback.
A new version will be released shortly.