コード例 #1
0
        public void InvokeAll()
        {
            MyEvent1(this, EventArgs.Empty);
            MyEvent2.Invoke(this, EventArgs.Empty);
            MyEvent3.DynamicInvoke(this, EventArgs.Empty);
            MyEvent4.BeginInvoke(this, EventArgs.Empty, null, null);
            this.MyEvent5(this, EventArgs.Empty);
            MyEvent6?.Invoke(this, EventArgs.Empty);

            MyAction1(this, EventArgs.Empty);
            MyAction2.Invoke(this, EventArgs.Empty);
            MyAction3.DynamicInvoke(this, EventArgs.Empty);
            MyAction4.BeginInvoke(this, EventArgs.Empty, null, null);
            this.MyAction5(this, EventArgs.Empty);
            MyAction6?.Invoke(this, EventArgs.Empty);
        }
コード例 #2
0
 public void TransferClick2()
 {
     MyEvent2?.Invoke(this, new MyEventArgs {
         Param = DateTime.Today.DayOfWeek
     });                                                                               // to simulate the click at View
 }
コード例 #3
0
 public void Handle(MyEvent2 domainEvent)
 {
     throw new NotImplementedException();
 }
コード例 #4
0
 public Task HandleAsync(MyEvent2 message)
 {
     Console.WriteLine("HandleAsync:MyEvent2");
     return(Task.CompletedTask);
 }