Exemple #1
0
        /// <summary>
        /// Run any applicable parsers
        /// </summary>
        /// <param name="session"></param>
        /// <param name="db"></param>
        /// <param name="pk"></param>
        private void PerformSessionProcessing(Session session, 
                                              int pk)
        {
            //OnMessage("Performing session parsing...");

            var parsers = from p in this._parsers where (p.Port == session.SourcePort | p.Port == session.DestinationPort) & p.Type == ParserType.Session select p;
            foreach (InterfaceParser parser in parsers)
            {
                if (parser.Enabled == false)
                {
                    continue;
                }

                SessionTask sessionTask = new SessionTask(parser.Name, session, _outputPath, pk);
                this.sessionParser.Add(sessionTask);
            }
        }
 /// <summary>
 /// 
 /// </summary>
 /// <param name="sessionTask"></param>
 public void Add(SessionTask sessionTask)
 {
     totalSessions++;
     this.blockingCollection.Add(sessionTask);
 }