Problem
Calling a wcf service requires some setup and tear down when done properly.
Solution
This code wraps the wcf call and takes care of closing and aborting the wcf client and channel factory. It also finds the configuration element automatically by the full name of the wcf interface. Note that you usually have to add the full namespace to the interface in the binding contract attribute for this code to work properly.
Background
https://msdn.microsoft.com/en-us/library/aa355056%28v=vs.110%29.aspx
https://msdn.microsoft.com/en-us/library/ms733912%28v=vs.110%29.aspx
https://msdn.microsoft.com/en-us/library/ms734681%28v=vs.110%29.aspx
Source Code
The Service Wrapper Class
Example Usage
Service Wrapper Tests. This also has some cool sytax from NSubstitute and Fluent Assertions.
I got to try out Jet Brains Dot Cover on this project. I'm really liking it!
Nice wrapper brother, how are things?
Hey guys! Ya, this code might look slightly familiar.. lol.. I'll bet Mario has a better version already rocking in the new code base!
Very nice work.