private void log_AddLogPacket(object sender, LogPacketEventArgs e) { LogPacket packet = new LogPacket(e); if (LogPacketEvent != null) { PacketLogEventArgs args = new PacketLogEventArgs(packet, sender as NetGraph); LogPacketEvent.Invoke(this, args); if (args.Filter) { packet = null; } else { packet = args.Packet; } } if (packet != null) { lock (_packetLog) { _packetLog.Add(packet); } } }
private void service_FilterLogPacketEvent(object sender, PacketLogEventArgs e) { LogPacketEvent?.Invoke(sender, e); }