private ProblemWorker CreateStoredInstance(IncidentParms parms) { ProblemWorker p = (ProblemWorker)Activator.CreateInstance(this.def.workerClass); p.target = parms.target; p.def = def; p.parms = parms; ProblemUtility.AllProblems.Add(p); return(p); }
protected override bool TryExecuteWorker(IncidentParms parms) { ProblemWorker realWorker = CreateStoredInstance(parms); realWorker.Initialize(); bool result = realWorker.TryStartProblem(); if (!result) { realWorker.Finish(); } return(result); }