예제 #1
0
 public static void AddResearchUpdateHandler(Guid id, ResearchStatusUpdateHandler method)
 {
     try
     {
         existingResearches[id].OnUpdateResearchStatus += method;
     }
     catch (KeyNotFoundException)
     {
         throw new CoreException("Specified research does not exists.");
     }
 }
 /// <summary>
 /// Remove handler for research status updates.
 /// </summary>
 /// <param name="id">ID of research.</param>
 /// <param name="method">Handler method to remove.</param>
 public static void RemoveResearchUpdateHandler(Guid id,
                                                ResearchStatusUpdateHandler method)
 {
     try
     {
         existingResearches[id].OnUpdateResearchStatus -= method;
     }
     catch (KeyNotFoundException)
     {
         throw new CoreException("Specified research does not exists.");
     }
 }