private void createSemesterSection(SemesterWP semester) { SemesterSection section = new SemesterSection(this, _localAccountId, semester); if (_semesterSections != null) { _semesterSections.Add(section); } }
/// <summary> /// When this is called, parent of semester should be initialized /// </summary> /// <param name="semester"></param> public void MakeSureHasSection(SemesterWP semester) { string fileName = Files.SEMESTER_FILE(_localAccountId, semester.Identifier); //if there's no section for it yet if (SemesterSections.Where(i => i.FileName.Equals(fileName)).FirstOrDefault() == null) { createSemesterSection(semester); } }