Beispiel #1
0
        string GetData(string id)
        {
            if (common == null)
            {
                common = CourseCSV.Initialize();
            }

            return(common.GetCourseData(id));
        }
 /// <summary>
 /// Initialize CourseCSV instance and load course data from storage, if any.
 /// </summary>
 /// <returns></returns>
 static public CourseCSV Initialize()
 {
     if (instance == null)
     {
         lock (obj)
         {
             instance = new CourseCSV();
             Task t = instance.LoadCourseData();
             t.Wait();
         }
     }
     return(instance);
 }