Hello,

I'm having some troubles with callback methods in async calls, most likely
due to anonymous methods.

>From the top. I'm using RestSharp for interacting with RESTful services.
RestSharp does use a few anonymous methods in the async calls.
I have two distinct service classes, each of them creating an instance of a
RestSharp client. They both have a callback method for handling the
response.
What's happening is that sometimes I'm getting the response of one request
in made by service A in the callback defined in service B. Obviously, that
doesn't work.

To confirm, there are no shared instances. Each service creates their
client instance and their request instance (where the callback is stored).
I don't have linking on. I do have shared runtime enabled, but by turning
it off the outcome is the same.

Yesterday, by suggestion of a member in the chat, I tried uninstalling the
application from the phone, cleaning the whole solution, rebuilding and
deploying.
It seemed to work... but it turns out it didn't. Today the same happened, I
retraced the steps and I still hate the same thing.

I'm kind of blind in here. I don't have the feeling that this happened in
previous versions (I'm on 4.2.6), but I can't really confirm that.
The only thing I suspect is the anonymous methods used in RestSharp source
code. I'm trying to avoid using anonymous methods myself, as there were a
few bugs with the debugger (think it was solved already), but it's a bit
harder to do that with third-party code (unless I stop using it).

Some advise on this would be very helpful.
Thanks,



-- 
Gonçalo Oliveira
_______________________________________________
Monodroid mailing list
[email protected]

UNSUBSCRIBE INFORMATION:
http://lists.ximian.com/mailman/listinfo/monodroid

Reply via email to