Reputation: 6567
var lockClient = new ServiceReference1.LockSoapClient();
lockClient.AcquireLockAsync();
bool status=true;
lockClient.AcquireLockCompleted += (s, e1) =>
{
status = e1.Result;
};
sendStat(status);
I want to pass the the boolean true/false
that i get from e.Result
directly in sendStat() method. e.g. sendStat(e1.Result)
I dont want to call this method inside the lockClient.AcquireLockCompleted
section. How do I do it?
real example
Brush brush = GetPolygonFill(vectorPolygon, false, Settings.LightSourcePosition, adjust);
This
Settings.LightSourcePosition
portion need to come from webservice
Upvotes: 0
Views: 168
Reputation: 563
There's no way to that outside of the completed method because of the async call. Anything inside the completed method is guaranteed to be executed once you have the results from your async call.
Upvotes: 1