Hey,
I am one of the developers on the original CodePlex site. As the CodePlex site is pretty much dead, I was going to fork it on GitHub today and found you already have, which is awesome. ๐
The reason this came up today is that I have a new and more complete ISmptClient
and SmtpClientWrap
that I was going add to the project. However, my implementation calls MailMessage
directly.
I notice in this fork, interfaces and wrappers were added for these objects that SmtpClientWrap
currently uses:
MailMessage = IMailMessage, MailMessageWrap
MailAddress = IMailAddress, MailAddressWrap
MailAddressCollection = IMailAddressCollection, IMailAddressFactoryWrap
MailAddressFactory = IMailAddressFactory, IMailAddressFactoryWrap
I hesitate to say that someone waisted their time because I am not 100% sure they did. However, MailMessage
, MailAddress
, MailAddressCollection
are all little more than poco classes and as such, they would fall into the category of objects that Should not be wrapped.
In a unit test, a MailMessage
, MailAddress
, MailAddressCollection
can be created and used no problem. The original project intent was to provide interfaces and wrapping things that cannot be created and used in Unit Tests otherwise. These objects can.
Is there something hidden in these objects that required them to be wrapped?
Or is there another use case that suggests they Should be wrapped?
If not, I will submit a pull request with my new SmtpClientWrap
and remove the unnecessary wrapping of these poco classes.
Obviously someone added these interfaces and before I submit a pull request to remove them I would like to verify whether they are really needed or not.