Example #1
0
 private TaskQueue(string name, ApartmentState?apartmentState, ILogger logger, IThreadChanger threadChanger)
 {
     Logger        = logger;
     ThreadChanger = threadChanger;
     _worker       = new Thread(Work)
     {
         IsBackground = true,
         Name         = _threadName + name
     };
     if (apartmentState.HasValue)
     {
         _worker.SetApartmentState(apartmentState.Value);
     }
     _worker.Start();
 }
Example #2
0
 public TaskQueueFactory(ILogger logger, IThreadChanger threadChanger)
 {
     Logger        = logger;
     ThreadChanger = threadChanger;
 }
Example #3
0
 public TaskQueue(string name, ApartmentState apartmentState, ILogger logger, IThreadChanger threadChanger)
     : this(name, new ApartmentState?(apartmentState), logger, threadChanger)
 {
 }
Example #4
0
 public TaskQueue(string name, ILogger logger, IThreadChanger threadChanger)
     : this(name, null, logger, threadChanger)
 {
 }