I am currently using SOAP Web Service in my iOS app using Xamarin C#. I want to have a nested callback to continue execution on Main UI Thread. Here's the example:
[WebService Method]
WSMethod(param A){
//do something
}
class A
{
InnerFunction(param A)
{
ws.BeginWSMethod(A, new AsyncCallback(WSMethodCallback), WebService);
}
WSMethodCallBack(IASyncResult ar)
{
//first callback here
result = ws.EndWSMethod(ar);
}
}
class B
{
OuterFunction()
{
//define param A..
InnerFunction(A);
//nested callback function - to be executed when WSMethodCallback finish
UpdateUIMethod();
}
}
How do I call 'UpdateUIMethod()' once the WSMethodCallBack has finished executing?
UPDATE:
UpdateUIMethod is an instance method of Class A that should be called within the corresponding instance (not a static method)