Ejemplo n.º 1
0
 public StudentManager()
 {
     _studentStorage = new StudentStorage();
     _rand           = new Random();
     _studentList    = _studentStorage.LoadStudentsList();
 }
 //Alternative constructor, that uses moc object
 //Instead of real StudentStorage object
 public StudentManager(StudentStorage storage)
 {
     _studentStorage = storage;
     _studentList    = _studentStorage.LoadStudentList();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Initializes a new instance of the StudentManager class.
 /// </summary>
 /// <param name="storage">The backing student storage.</param>
 public StudentManager(StudentStorage storage)
 {
     _storage     = storage;
     _rand        = new Random();
     _studentList = _storage.LoadStudentList();
 }
 public StudentManager()
 {
     //Create new Student Storage object and student list
     _studentStorage = new StudentStorage();
     _studentList    = _studentStorage.LoadStudentList();
 }