C# Class NSoft.NFramework.UnitTesting.CrossThreadRunner

Multi-Thread 환경하에서 Test를 하기 위한 보조 클래스이다.
Multi-Thread 환경에서 Test를 하고자 할 때 Test하고자 하는 함수를 ThreadStart 로 Wrapping 하여 CrossThreadRunner를 생성시킨다. 그후 CrossThreadRunner.RunEach() 을 호출하면 Test가 이루어진다.
显示文件 Open project: debop/NFramework

Public Methods

Method Description
CrossThreadRunner ( ThreadStart userDelegate ) : System

생성자

Run ( ) : void

쓰레드 하에서 수행

Private Methods

Method Description
MultiThreadedWorker ( ) : void

ThreadStart를 try-catch 구문 안에서 실행시킨다.

ThrowExceptionPreservingStack ( Exception exception ) : void

Method Details

CrossThreadRunner() public method

생성자
public CrossThreadRunner ( ThreadStart userDelegate ) : System
userDelegate ThreadStart Thread 안에서 수행할 메소드
return System

Run() public method

쓰레드 하에서 수행
public Run ( ) : void
return void