Closed qmfrederik closed 8 years ago
I think this is actually the same issue as #4, so this PR should help you resolve that one, too.
... and probably this solves #1 as well :)
This is great news! I noticed that the build failed. Is it easily fixable?
The
Result
property of theCommandResponse<T>
object was never being assigned in my case.I tracked it down to
Result
having a private setter, which Newtonsoft.Json apparently never tries to assign values to (at least in the most recent versions).You can workaround this by creating a custom
ContractResolver
.This PR implements that behavior, and allows for the creators of the
CommandResponseFactory
to pass a customer serializer if they so desire. I also made theMessageContractResolver
you ship public, as I for example wanted to re-use that one in my code (I manually serialize theCommandRequests
to the wire).I added a unit test which can act as a non-regression test for this fix.