private async Task delete() { var actionType = IsEditingGroup ? ActionType.DeleteMultipleExistingTimeEntries : ActionType.DeleteExistingTimeEntry; var interactor = IsEditingGroup ? interactorFactory.DeleteMultipleTimeEntries(TimeEntryIds) : interactorFactory.DeleteTimeEntry(TimeEntryId); var isDeletionConfirmed = await delete(actionType, TimeEntryIds.Length, interactor); if (isDeletionConfirmed) { close(EditViewCloseReason.Delete); } }