Change to Send() re: IReturn in ServiceClientBase from 4.0.56 onwards


We’ve just upgraded our project from V4.0.54 of SS to 4.0.56 and now a lot of code no longer compiles. We have code like this :

var myResponse = client.Send(new MyRequest());

Where MyRequest has a IReturn<> declared. This has worked fine since we started using SS. Now however this code no longer compiles as Send() appears to have changed from :

public virtual TResponse Send<TResponse>(IReturn<TResponse> request);


public virtual TResponse Send<TResponse>(object request); 

so the return type can’t seem to be inferred any more yielding errors such as :

The type arguments for method 'ServiceClientBase.Send<TResponse>(object)' cannot be inferred from the usage. Try specifying the type arguments explicitly.

Has anyone else come across this? I can’t believe it’s just us but I’m also not sure what we’re doing wrong. I’m slightly loathe to go round and explicitly type all the Send<>() calls in our code unless I absolutely have to.

Many thanks,

Steve H

There is extension method which should send the IReturn<TResponse> request parameter. Maybe using ServiceStack; is missing somehow in the code? Can you provide the code, which does not compile?

Thanks, a simple missing :

using ServiceStack;

was the problem - not sure why we never noticed that was missing!