public SearchManager(SearchCriteria searchCriteria, int threadCount)
{
if (threadCount < 2)
{
string msg = "Application misconfigured. ";
msg += "Set the MAX_THREADS constant to a value > 1";
throw new ArgumentException(msg);
}
_searchCriteria = searchCriteria;
_threadCount = threadCount;
DoWork += Work;
WorkerReportsProgress = true;
WorkerSupportsCancellation = true;
}