Exemple #1
0
 private void InitializeThreadState(object threadParams, ThreadDispatch.ThreadWorkerMethod workerMethod, ApartmentState aptState, bool background)
 {
     this.threadParams       = threadParams;
     this.threadWorkerMethod = workerMethod;
     this.thread             = new Thread(new ThreadStart(this.ThreadEntryPoint));
     this.thread.SetApartmentState(aptState);
     this.backgroundThread = background;
 }
Exemple #2
0
 private ThreadDispatch()
 {
     this.thread       = null;
     this.exception    = null;
     this.threadParams = null;
     this.threadWorkerMethodWithReturn         = null;
     this.threadWorkerMethodWithReturnAndParam = null;
     this.threadWorkerMethod          = null;
     this.threadWorkerMethodWithParam = null;
     this.threadReturn     = null;
     this.backgroundThread = false;
     this.apartmentType    = ApartmentState.MTA;
 }
Exemple #3
0
 public ThreadDispatch(ThreadDispatch.ThreadWorkerMethod workerMethod) : this()
 {
     this.InitializeThreadState(null, workerMethod, ApartmentState.MTA, false);
 }
Exemple #4
0
		private ThreadDispatch()
		{
			this.thread = null;
			this.exception = null;
			this.threadParams = null;
			this.threadWorkerMethodWithReturn = null;
			this.threadWorkerMethodWithReturnAndParam = null;
			this.threadWorkerMethod = null;
			this.threadWorkerMethodWithParam = null;
			this.threadReturn = null;
			this.backgroundThread = false;
			this.apartmentType = ApartmentState.MTA;
		}
Exemple #5
0
		private void InitializeThreadState(object threadParams, ThreadDispatch.ThreadWorkerMethod workerMethod, ApartmentState aptState, bool background)
		{
			this.threadParams = threadParams;
			this.threadWorkerMethod = workerMethod;
			this.thread = new Thread(new ThreadStart(this.ThreadEntryPoint));
			this.thread.SetApartmentState(aptState);
			this.backgroundThread = background;
		}