I recently discovered a possible candidate for dependency injection in a .NET application that I developed.
Due to recent organizational policies, it is no longer possible to call smtp mail services from client computers on our network. Therefore, I will have to reorganize all the code in my application, where previously it called the smtp object to send mail.
I created a new WCF web service on an authorized web server that allows you to send smtp mail messages.
This seems to be a great candidate for addiction. I will create a new INotification interface that will have the "void SendNotification (MailMessage msg)" method and create a new property in my application, where you can set this property for any class that implements this interface.
My question is, is it possible, through dependency injection, to encapsulate the creation of the .NET WCF web service? I'm new to IoC and Dependency deployment infrastructures, so I'm not quite sure if it can work with web service dependencies?
I hope someone else there has encountered this situation or is aware of this subject?
amuses John
source
share