Esempio n. 1
0
 protected BackgroundWorker(IBackgroudWorkerProxy workProxy, WorkerConfig config)
 {
     _workProxy = workProxy;
     _config    = config;
 }
 public void Excete <T>(Action method, WorkerConfig config) where T : IBackgroundWorkerDo
 {
     ExetuteMethod = method;
     Timer.Period  = config.IntervalSecond * 1000;//将传入的秒数转化为毫秒
     Timer.Start();
 }