public bool Remove(GraduateStudent rt) { if (GraduateStudentsDictionaryCollection.ContainsValue(rt)) { foreach (KeyValuePair <TKey, GraduateStudent> kvp in GraduateStudentsDictionaryCollection) { if (kvp.Value == rt) { kvp.Value.PropertyChanged -= GraduateStudentPropertyChanged; GraduateStudentsDictionaryCollection.Remove(kvp.Key); GraduateStudentsChanged?.Invoke(kvp.Value, new GraduateStudentsChangedEventArgs <TKey>(Name, Revision.Remove, "", kvp.Value.LearningYear)); return(true); } } } return(false); }
public void GraduateStudentPropertyChanged(object obj, PropertyChangedEventArgs ar) { GraduateStudentsChanged?.Invoke(obj, new GraduateStudentsChangedEventArgs <TKey>(Name, Revision.Property, ar.PropertyName, (obj as GraduateStudent).LearningYear)); }