Exemple #1
0
 /// <summary>
 /// This module finished startup and is giving a list of data about its startup
 /// </summary>
 /// <param name="name"></param>
 /// <param name="data"></param>
 public void FinishedStartup(string name, List <string> data)
 {
     if (StartupCallbacks.Contains(name))
     {
         StartupCallbacks.Remove(name);
         if (data.Count != 0)
         {
             List <string> NewData = new List <string>(data.Count + 2); //Fixed size to reduce memory
             NewData.Add(name);
             NewData.Add(data.Count.ToString());
             NewData.AddRange(data);
             StartupData.AddRange(NewData);
         }
         if (StartupCallbacks.Count == 0)
         {
             //All callbacks are done, trigger startup complete
             EventManager.TriggerStartupComplete(this, StartupData);
         }
     }
 }