public void InsertSubEvent(IBatchAddingEventModel model, TimeSpan timeSpan) { var targetAssignmentTypes = model.AssignmentTypes .OfType <TermStyle>().Where(o => o.SaftyGetProperty <bool?, ISelectable>(x => x.IsSelected) == true) .ToArray(); var noAssignmentTypesSelected = targetAssignmentTypes.Count() == 0; TryDispatch(model, t => noAssignmentTypesSelected || targetAssignmentTypes.Any(o => o.Text == t.Text), model.GetDefaultAction(timeSpan)); }
public void InsertSubEvent(IBatchAddingEventModel model, TimeSpan timeSpan) { var targetAssignmentTypes = model.AssignmentTypes .OfType<TermStyle>().Where(o => o.SaftyGetProperty<bool?, ISelectable>(x => x.IsSelected) == true) .ToArray(); var noAssignmentTypesSelected = targetAssignmentTypes.Count() == 0; TryDispatch(model, t => noAssignmentTypesSelected || targetAssignmentTypes.Any(o => o.Text == t.Text), model.GetDefaultAction(timeSpan)); }