You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This method lead to an "Invalid program" exception during runtime. Removing "DisplayWaitCursor" attribute fixes the problem
This should be tried to reproduce.
[DisplayWaitCursor]
private async Task Add(InvoiceContactViewModel contactViewModel)
{
if (contactViewModel == null)
return; if (ChosenContactViewModels.Contains(contactViewModel))
return; if (ShowOnlyContactsWithoutIncidents)
{
var hasContactIncident = await HasContactIncident(contactViewModel); if (hasContactIncident)
{
_show.Error(
MultipleContactSelectionDialogResources.AssignContactToCorporationHint,
contactViewModel.Contact.AdvancedEntityText); return;
}
} var removeItem = AvailableContactViewModels
.SingleOrDefault(x => x.Contact.ID == contactViewModel.Contact.ID); ChosenContactViewModels.Add(contactViewModel); if (removeItem != null)
AvailableContactViewModels.Remove(removeItem);
}
The text was updated successfully, but these errors were encountered:
Without the additional code, it is impossible to reproduce the error from your example.
That said, this looks like it matches the pattern of a method ending in a code block (if (removeItem != null) { AvailableContactViewModels.Remove(removeItem); }) related to issue #66. A simple work around is to simply add another line of code after the block. (for example, end the method with await Task.CompletedTask;)
This method lead to an "Invalid program" exception during runtime. Removing "DisplayWaitCursor" attribute fixes the problem
This should be tried to reproduce.
The text was updated successfully, but these errors were encountered: