public void CheckCollection(ArrayList phones) { isValid = true; foreach (Phone phone in phones) { foreach (ICheck cheker in chekers) { if (cheker.CanCheck(phone)) { if (!cheker.Check(phone)) { isValid = false; } } } } ValidChanged?.Invoke(isValid); }
/// <summary> /// Fires ValidChanged. /// </summary> protected virtual void OnValidChanged() { ValidChanged?.Invoke(this, EventArgs.Empty); }