Hello,
refactoring my code I've seen that in some point I use MessageBoxes to show exceptions...
Here's an example
public void LoadData()
{
IsBusy = true;
_repository.LoadData(idUser,
Date,
results =>
{
DataItems = new BindableCollection<myObj>(results.Cast<MarginCCSnapShotResult>());
CanPrintExport =
true;
IsBusy = false;
},
e =>
{
CanPrintExport = false;
IsBusy = false;
MessageBox.Show(e.Message);
});
}
I've decided to use the Kevin Mees implementation of Dialogs handling... but I don't knwo how to return the type since the Coorutine Error returns a IEnumerable<IResult>.
I tried yield return for
error.AsResult() but it says “The yield statement cannot be used inside an anonymous method or lambda
expression”
the other problem would be what type should I return instead of the void?
Thanks
Paolo