protected override void Dispose(bool disposing) { try { if (disposing) { hrManager.Dispose(); HolderVm.Dispose(); selectedOrder.Clear(); disposed = true; } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { try { if (disposing) { if (Holder is Patient) { (Holder as Patient).CoursesChanged -= nested_IHrsHolders_Changed; } if (Holder is Course) { (Holder as Course).AppointmentsChanged -= nested_IHrsHolders_Changed; } Holder.PropertyChanged -= holder_PropertyChanged; HolderVm.Dispose(); } } finally { base.Dispose(disposing); } }
protected override void Dispose(bool disposing) { if (disposing) { PrevHolder = null; NextHolder = null; if (holder is Course) { var course = holder as Course; course.Patient.CoursesChanged -= Patient_CoursesChanged; } else if (holder is Appointment) { var app = holder as Appointment; app.Course.AppointmentsChanged -= Course_AppointmentsChanged; } ((INotifyPropertyChanged)holder).PropertyChanged -= Holder_PropertyChanged; HolderVm.Dispose(); } base.Dispose(disposing); }