1 The basic idea of the tests are to try to exit the running process by calling
2 Environment.Exit(int). The entry point, Main, denies UnmanagedCode from being
3 executed. UnmanagedCode is required to call Environment.Exit(int). Then we try
4 to call Environment.Exit(int) from other threads which "should" have inherited
5 the restriction from the "main" (i.e. original) thread.
7 This security stack "inheritance" is called "stack propagation".
9 * delegate1.cs Use a static delegate to test stack propagation.
10 * delegate2.cs Use an instance delegate to test stack propagation.
12 * thread1.cs Deny unmanaged code before creating the thread object.
13 * thread2.cs Deny unmanaged code after creating the thread object but
15 * thread3.cs Deny unmanaged code after creating the thread object and
18 * timer1.cs: Use System.Threading.Timer (Thread.Start) to test stack
20 * timer2.cs: Use System.Timers.Timer (ThreadPool.QueueUserWorkItem) to test
23 * swf-timer3.cs: Use System.Timers.Timer (ThreadPool.QueueUserWorkItem) with a
24 SynchonizingObject (like required for SWF) to test stack
26 * swf-timer4.cs: Use System.Windows.Forms.Timer to test stack propagation.
28 * swf-control1.cs: Use Control.BeginInvoke to test stack propagation.
30 * tpool1.cs: Use ThreadPool.QueueUserWorkItem to test stack propagation.
31 * tpool2.cs: Use ThreadPool.UnsafeQueueUserWorkItem to test non-propagation
36 * swf-*.cs test cases requires SWF (and it's dependancies) to be installed
37 (and functional) to succeed.