public bool UpdateTemplate(Template newBest, string NoID) { string _NoID = ""; float[] scores; bool result = false; try { lock (this) { ParallelMatcher Matcher = new ParallelMatcher(); ParallelMatcher.PreparedProbe probeIndex = Matcher.Prepare(newBest); scores = Matcher.Match(probeIndex, _fingerPrintCandidateList); if (scores.Length > 0) { for (int i = 0; i < scores.Count(); i++) { if (scores[i] > _matchThreshold) { _NoID = _fingerPrintCandidateList[i].NoID.LocalNoID; if (_NoID == NoID) { newBest.NoID.LocalNoID = _NoID; _fingerPrintCandidateList[i] = newBest; break; } } } } } result = true; } catch (Exception ex) { _exception = ex; } return(result); }