private void RunBlock(object pThreadParams) { try { ThreadParams blockPars = (ThreadParams)pThreadParams; RunLogicBlock(blockPars); } catch (Exception ex) { CalculationExceptionList.Add(new EntropyCalculatorException(C_CalcError, ex)); } }
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); }
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); } } }); }