コード例 #1
0
 private static void ExecuteHandlers(List <Action <EventArg> > evenHandlers, EventArg parameter)
 {
     foreach (var action in evenHandlers)
     {
         action(parameter);
     }
 }
コード例 #2
0
 public static void PublishEvent(string eventName, EventArg parameter)
 {
     if (dic.ContainsKey(eventName))
     {
         ExecuteHandlers(dic[eventName], parameter);
     }
 }