@@ -34,7 +34,7 @@ public partial class WorkerManager
3434
3535 private ConcurrentDictionary < string , BackgroundWorker > bgworkerlist ;
3636 private int tempCounter ;
37- private bool isRunning ;
37+ public bool IsRunning { get ; protected set ; }
3838
3939 public delegate void Callback ( ) ;
4040
@@ -46,14 +46,14 @@ public WorkerManager(TaskManager taskManager)
4646 bgworkerlist = new ConcurrentDictionary < string , BackgroundWorker > ( ) ;
4747 workerType = new ConcurrentDictionary < string , WorkerType > ( ) ;
4848 tm = taskManager ;
49- isRunning = false ;
49+ IsRunning = false ;
5050 tempCounter = 0 ;
5151 }
5252
5353 public void AddTask ( TaskDetail detail )
5454 {
5555 tm . AddTask ( detail ) ;
56- if ( isRunning )
56+ if ( IsRunning )
5757 {
5858 foreach ( string worker in workerList )
5959 {
@@ -77,7 +77,7 @@ public bool Start()
7777 }
7878
7979 int activeTaskCount = tm . GetActiveTaskCount ( ) ;
80- isRunning = true ;
80+ IsRunning = true ;
8181
8282 foreach ( string worker in workerList )
8383 {
@@ -150,7 +150,7 @@ public string AddTempWorker()
150150 workerType . TryAdd ( name , WorkerType . Temporary ) ;
151151 }
152152
153- if ( isRunning )
153+ if ( IsRunning )
154154 {
155155 CreateWorker ( name ) ;
156156 StartWorker ( name ) ;
@@ -172,7 +172,7 @@ public bool AddWorker(string name)
172172 workerType . TryAdd ( name , WorkerType . Normal ) ;
173173 }
174174
175- if ( isRunning )
175+ if ( IsRunning )
176176 {
177177 CreateWorker ( name ) ;
178178 StartWorker ( name ) ;
@@ -183,7 +183,7 @@ public bool AddWorker(string name)
183183
184184 public bool DeleteWorker ( string name )
185185 {
186- if ( isRunning )
186+ if ( IsRunning )
187187 {
188188 return false ;
189189 }
@@ -199,7 +199,7 @@ public bool DeleteWorker(string name)
199199 public void StopWorker ( string name )
200200 {
201201 // TODO
202- isRunning = false ;
202+ IsRunning = false ;
203203
204204 if ( bgworkerlist . ContainsKey ( name ) )
205205 {
0 commit comments