public static void StartThread(Thread thread) { ThreadDataManagerData data = ThreadDataManager.Current; StartThreadData startThreadData = new StartThreadData { Data = data, }; thread.Start(startThreadData); }
public static void StartThread(Thread thread, object parameter) { ThreadDataManagerData data = ThreadDataManager.Current; StartThreadData startThreadData = new StartThreadData { Data = data, Parameter = parameter }; thread.Start(startThreadData); }
public static ParameterizedThreadStart CreateThreadStart(ThreadStart threadStart) { return(delegate(object parameter) { StartThreadData startThreadData = (StartThreadData)parameter; using (ThreadDataManager.Initialize(startThreadData.Data)) { threadStart(); } }); }