コード例 #1
0
        protected virtual void OnRaiseEvent(EventSourceEventTypeEventArgs eventSourceEventTypeEventArgs)
        {
            EventHandler <EventSourceEventTypeEventArgs> raiseEvent = RaiseEvent;

            if (raiseEvent != null)
            {
                raiseEvent(this, eventSourceEventTypeEventArgs);
            }
        }
コード例 #2
0
 private void HandleEvent(object sender, EventSourceEventTypeEventArgs args)
 {
     Console.WriteLine($"Received event at: {DateTime.Now}, Message class is {args.EventClass}, Message is {args.Message}");
 }