示例#1
0
 private void Pub_RaiseCustomEvent(object sender, CustomEventArgs e)
 {
     Console.WriteLine(Id + " received this message:{0}", e.Message);
 }
示例#2
0
 protected virtual void OnRaiseCustomEvent(CustomEventArgs e)
 {
     e.Message += $"at {DateTime.Now}";
     RaiseCustomEvent?.Invoke(this, e);
 }