Dresel/MethodCache — pull request #7 by tpluscode (2014-03-23 19:00:35+00:00)
Title: Property cache

Hi

I've just finished implementing property cache, which will resolve both issue #5 and #6. Please have a look at readme.md for a brief description of the changes.

I believe that the new functionality is ready, which I have plenty of unit tests to back up. The only thing I'm not sure would be checking the Cache getter type for required methods. I didn't want to further complicate ModuleWeaver and so for methods and property getters the Store/Retrieve/Contains methods are required for weaving. Weaving of property setters additionally require a new Remove method. I initially addded the new requirement to the existing check, but that would be a breaking change causing all existing usage to stop working until the cache classes are updated. However with the current solution it is possible that a property getter will be woven but the setter will not, which can have unexpected results...

As I said, fixing this now will mean more fundamental changes to ModuleWeaver, thus I suggest merely adding a Nuget readme so that users are warned and either update their cache classes or disable property weaving in FodyWeavers.xml

Now, regarding the change from MsTest to NUnit, frankly, I think NUnit should stay. Not only NUnit is more feature rich (this may not matter to you here I know) but first of all it works on all versions of Visual Studio. I actually had to recreate the csproj files because they were totally incompatible with VS 2010. I guess you will be concerned with running the tests from VS. This should not be a problem with the nuget NUnitTestAdapter package I added. With it you should have no problems running NUnit tests in VS 2012 and 2013. We are happily using it in our project. Other than that I highly recommend Resharper to everyone ;)