Example #1
0
 private void RunBlock(object pThreadParams)
 {
     try
     {
         ThreadParams blockPars = (ThreadParams)pThreadParams;
         RunLogicBlock(blockPars);
     }
     catch (Exception ex)
     {
         CalculationExceptionList.Add(new EntropyCalculatorException(C_CalcError, ex));
     }
 }
Example #2
0
        private void AddEntropyResults(ThreadParams pThreadParams, EntropyLogic pEntropyLogic, MatchCollection pMatchCollection)
        {
            EntropyResult er2 = pThreadParams.FindEntropyResult(pEntropyLogic.Name);

            if (er2 == null)
            {
                er2 = new EntropyResult()
                {
                    Logic = pEntropyLogic
                };
                pThreadParams.AddEntropyResult(er2);
            }
            AddEntropyResultItems(pEntropyLogic, pMatchCollection, er2);
        }
Example #3
0
 private void RunLogicBlock(ThreadParams pThreadParams)
 {
     Parallel.ForEach(logic.EntropyLogicList, (el) =>
     {
         for (int i = 0; i < pThreadParams.TextListCount; i++)
         {
             MatchCollection mc = FindSigns(el, pThreadParams.GetTextList(i));
             if (mc != null)
             {
                 AddEntropyResults(pThreadParams, el, mc);
             }
         }
     });
 }