Esempio n. 1
0
        private void OnBeginRequest(object sender, EventArgs e)
        {
            var application = sender as HttpApplication;

            application.Context.Response.Write("Hello");
            _eventHandler?.Invoke(this, null);
        }
Esempio n. 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();
        }
Esempio n. 3
0
 public static void Raise(this CustomEventHandler handler)
 {
     handler?.Invoke();
 }
Esempio n. 4
0
 public static void Raise <T>(this CustomEventHandler <T> handler, T arg)
 {
     handler?.Invoke(arg);
 }
Esempio n. 5
0
 public static void Raise <T, T1>(this CustomEventHandler <T, T1> handler, T arg, T1 arg2)
 {
     handler?.Invoke(arg, arg2);
 }
Esempio n. 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);
 }