This project is read-only.
Async Samples
Project demonstrating new C# feature - async and await.

You can find here several solutions to make UI calls asynchronous: APM, EAP and async.

For more details you can find my blog here: http://blog.macmichal.pl

private async void AddCustomerAndAddressAsyncWithExceptionHandlingAndDisposable(
    object sender, RoutedEventArgs e)
{
    using (Pending())
    {
        try
        {
            var asyncSerice = new SampleServiceClient();
            CustomerId = await asyncSerice.AddCustomerAsync(
                CustomerName.Text);
            AddressId = await asyncSerice.AddAddressAsync(
                CustomerId.Value, Address.Text);
        }
        catch (FaultException exception)
        {
            Exception = exception;
        }
    }
}

Last edited Nov 2, 2012 at 2:36 PM by michaelmac, version 5