public void TriggerEvent1()
 {
     if (Event1 != null)
     {
         Event1.Invoke(this, new Event1Args($"Total subscribers: ${Event1.GetInvocationList().Length}"));
     }
 }
예제 #2
0
        public void RaiseEvents()
        {
            Event1.Invoke();

            // have difference of 20 ms between both events
            Thread.Sleep(20);

            Event2.Invoke();
        }
예제 #3
0
        public bool Equals(Carbrand car)
        {
            if (car == null)
            {
                return(false);
            }

            if (car.LandProducer == "Russia")
            {
                Event1?.Invoke();
            }
            else
            {
                Event2?.Invoke();
            }
            return(car.LandProducer == "Russia");
        }
예제 #4
0
 public void RaiseEvent1()
 {
     Event1?.Invoke(this, 777);
 }
예제 #5
0
 public void RaiseEvent1()
 {
     Event1?.Invoke(this, EventArgs.Empty);
 }
예제 #6
0
 public void RaiseEvent()
 {
     Event1?.Invoke();
 }
예제 #7
0
 private void Button_Click1(object sender, RoutedEventArgs e)
 {
     Event1.Invoke(sender, e);
 }
예제 #8
0
 public void Trigger() => Event1?.Invoke(1);
예제 #9
0
파일: Events.cs 프로젝트: maxim2347/Work
 public void RaiseEvent1()
 {
     //if(Event1 != null)
     //    Event1(this, EventArgs.Empty);
     Event1?.Invoke(this, EventArgs.Empty);
 }
예제 #10
0
 public void OnEvent1(int n)
 {
     Event1?.Invoke(n);
 }