Esempio n. 1
0
        public static void Fire <TSender, TArgs>(this EventHandlerCollection <TSender, TArgs> handlers, TSender sender, TArgs args)
        {
            if (handlers == null)
            {
                return;
            }

            foreach (var handler in handlers)
            {
                handler(sender, args);
            }
        }
Esempio n. 2
0
 public static void Fire <TSender>(this EventHandlerCollection <TSender, EventArgs> handlers, TSender sender)
 {
     Fire(handlers, sender, EventArgs.Empty);
 }