Example #1
0
        private void TodoServices_GetTodoItemsCompleted(object sender, ASMXService.GetTodoItemsCompletedEventArgs e)
        {
            try
            {
                getRequestComplete = getRequestComplete ?? new TaskCompletionSource <bool>();

                Items = new List <TodoItem>();

                foreach (var item in e.Result)
                {
                    Items.Add(FromASMXServiceTodoItem(item));
                }

                getRequestComplete?.TrySetResult(true);
            }
            catch (Exception ex)
            {
                System.Diagnostics.Debug.WriteLine(@"Error {0}", ex.Message);
            }
        }
        private void TodoService_GetTodoItemsCompleted(object sender, ASMXService.GetTodoItemsCompletedEventArgs e)
        {
            try
            {
                getRequestComplete = getRequestComplete ?? new TaskCompletionSource <SoapResult <List <TodoItem> > >();

                Items = new List <TodoItem>();
                foreach (var item in e.Result)
                {
                    Items.Add(FromASMXServiceTodoItem(item));
                }
                getRequestComplete?.TrySetResult(new SoapResult <List <TodoItem> >()
                {
                    res = Items, error = e.Error
                });
            }
            catch (Exception ex)
            {
                Debug.WriteLine("\t\tERROR {0}", ex.Message);
            }
        }