示例#1
0
        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);
                }
            }
        }
示例#2
0
 private void service_FilterLogPacketEvent(object sender, PacketLogEventArgs e)
 {
     LogPacketEvent?.Invoke(sender, e);
 }