Example #1
0
        private void OnBeginRequest(object sender, EventArgs e)
        {
            var application = sender as HttpApplication;

            application.Context.Response.Write("Hello");
            _eventHandler?.Invoke(this, null);
        }
Example #2
0
        static void Main(string[] args)
        {
            _show += new CustomEventHandler(Dog);
            _show += new CustomEventHandler(Cat);
            _show += new CustomEventHandler(Mouse);
            _show += new CustomEventHandler(Mouse);

            _show -= new CustomEventHandler(Cat);
            _show.Invoke();
        }
Example #3
0
 public static void Raise(this CustomEventHandler handler)
 {
     handler?.Invoke();
 }
Example #4
0
 public static void Raise <T>(this CustomEventHandler <T> handler, T arg)
 {
     handler?.Invoke(arg);
 }
Example #5
0
 public static void Raise <T, T1>(this CustomEventHandler <T, T1> handler, T arg, T1 arg2)
 {
     handler?.Invoke(arg, arg2);
 }
Example #6
0
 public static void Raise <T, T1, T2>(this CustomEventHandler <T, T1, T2> handler, T arg, T1 arg2, T2 arg3)
 {
     handler?.Invoke(arg, arg2, arg3);
 }