Beispiel #1
0
 /// <summary>
 /// Copies the Deserialized Json data into a Student
 /// </summary>
 /// <param name="data">raw data object for json-deserialized student</param>
 public void Deserialize(StudentArgs data)
 {
     this.id        = data.ID.ToString();
     this.firstName = data.FName;
     this.lastName  = data.LName;
     foreach (EnrolledCourseArgs args in data.Courses)
     {
         courses.Add(new EnrolledCourse(args));
     }
 }
Beispiel #2
0
 /// <summary>
 /// Initializes <see cref="Student"/> with <see cref="StudentArgs"/> using <see cref="Student.Deserialize(StudentArgs)"/>
 /// </summary>
 /// <param name="args">Student data needed to fully populate a student</param>
 /// <see cref="StudentArgs"/>
 public Student(StudentArgs args)
 {
     courses = new List <EnrolledCourse>();
     Deserialize(args);
 }