Exemplo n.º 1
0
    public void executeDistributedTaskAsync()
    {
        MerchantByCategoryTask task = new MerchantByCategoryTask(
            ECategoryType.AUTOMOTIVE);

        IAsyncResult <List <Merchant> > asyncResult = proxy.BeginExecute(task, null /*callback*/, null /*state object*/);

        //	...
        //This will block until the result execution has arrived
        asyncResult.AsyncWaitHandle.WaitOne();
        //Gets the actual result of the async execution
        List <Merchant> result = proxy.EndExecute(asyncResult);
    }