Beispiel #1
0
        private void log_AddLogPacket(object sender, LogPacketEventArgs e)
        {
            LogPacket packet = new LogPacket(e);

            if (FilterLogPacketEvent != null)
            {
                FilterPacketLogEventArgs args = new FilterPacketLogEventArgs(packet, sender as NetGraph);

                FilterLogPacketEvent.Invoke(this, args);

                if (args.Filter)
                {
                    packet = null;
                }
                else
                {
                    packet = args.Packet;
                }
            }

            if (packet != null)
            {
                lock (_packetLog)
                {
                    _packetLog.Add(packet);
                }
            }
        }
Beispiel #2
0
 private void service_FilterLogPacketEvent(object sender, FilterPacketLogEventArgs e)
 {
     if (FilterLogPacketEvent != null)
     {
         FilterLogPacketEvent(sender, e);
     }
 }
Beispiel #3
0
        private void log_AddLogPacket(object sender, LogPacketEventArgs e)
        {
            LogPacket packet = new LogPacket(e);

            if (FilterLogPacketEvent != null)
            {
                FilterPacketLogEventArgs args = new FilterPacketLogEventArgs(packet, sender as NetGraph);

                FilterLogPacketEvent.Invoke(this, args);

                if (args.Filter)
                {
                    packet = null;
                }
                else
                {
                    packet = args.Packet;
                }
            }

            if (packet != null)
            {
                lock (_packetLog)
                {
                    _packetLog.Add(packet);
                }
            }
        }
Beispiel #4
0
 private void service_FilterLogPacketEvent(object sender, FilterPacketLogEventArgs e)
 {
     if (FilterLogPacketEvent != null)
     {
         FilterLogPacketEvent(sender, e);
     }
 }
 void _service_FilterLogPacketEvent(object sender, FilterPacketLogEventArgs e)
 {
     if (_enableRedirect)
     {
         if (redirectLogControl.Mode == RedirectLogControl.RedirectLogMode.ToFile)
         {
             FilePacketLogger logger = GetLogFile(e.Graph);
             if (logger != null)
             {
                 logger.AddPacket(e.Packet);
             }
         }
         e.Filter = true;
     }
 }