how can I get Async call result inside getter property? my code sample is:
public override byte[] AddressBasedDocFile
{
get
{ BaseInfoImplementationClient.AlfrescoServiceProxy.AlfrescoServicesProxyClient client = new BaseInfoImplementationClient.AlfrescoServiceProxy.AlfrescoServicesProxyClient();
client.GetDataCompleted+=client_GetDataCompleted;
client.GetDataAsync(this.ObjectId) ;
}
set
{
base.AddressBasedDocFile = value;
}
}
void client_GetDataCompleted(object sender, BaseInfoImplementationClient.AlfrescoServiceProxy.GetDataCompletedEventArgs e)
{
e.Result
}
there is a solution here that used tasks to do the job, but as I know, I can't change client.GetDataAsync(this.ObjectId)
such that it returns a value, its really an asynchronous service call.