Select to view content in your preferred language

Run IdentifyTask Synchronously

626
1
05-09-2013 10:36 AM
MarkLawrence
Emerging Contributor
I have been doing some searching on the web, and on these forums, and haven't seen much.

Is there a way to either run the IdentifyTask synchronously, or wrap it in a C# type that would allow me to wait for the completion of the IdentifyTask before executing following lines?
0 Kudos
1 Reply
RichardWatson
Deactivated User
Sorry if I am missing the obvious.

I believe that the identify task calls you back when it succeeds or fails:

http://help.arcgis.com/en/webapi/silverlight/help/index.html#/Identify_task/01660000001m000000/

If you want code to execute after it succeeds then just put the code in the block which is called on success.

If you really want to block (does not sound like a good idea) then you do that as well:

http://www.codeproject.com/Articles/31018/Synchronous-Web-Service-Calls-with-Silverlight-Dis
0 Kudos