/// <summary> /// Creates an instance of <see cref="StudyTree"/>. /// </summary> public StudyTree() { _patients = new PatientCollection(); _studies = new Dictionary <string, Study>(); _series = new Dictionary <string, Series>(); _sops = new Dictionary <string, Sop>(); }
/// <summary> /// Implementation of the <see cref="IDisposable"/> pattern /// </summary> /// <param name="disposing">True if this object is being disposed, false if it is being finalized</param> private void Dispose(bool disposing) { if (disposing) { if (_sops != null) { foreach (Sop sop in _sops.Values) { sop.Dispose(); } _sops.Clear(); _sops = null; } if (_series != null) { foreach (Series series in _series.Values) { series.SetSop(null); } _series.Clear(); _series = null; } if (_studies != null) { foreach (Study study in _studies.Values) { study.SetSop(null); } _studies.Clear(); _studies = null; } if (_patients != null) { foreach (Patient patient in _patients) { patient.SetSop(null); } _patients.Clear(); _patients = null; } } }