コード例 #1
0
ファイル: rethrow.cs プロジェクト: Fredo-Q/dotnet-coreclr
                    public static int Main(String[] args)
                    {
                        String s = "Done";

                        System.IO.TextWriter t = Console.Out;
                        Console.SetOut(t);
                        int retVal = 101;

                        Thread[]           mv_Thread = new Thread[10];
                        RethrowException[] he        = new RethrowException[12];
                        for (int i = 0; i < 10; i++)
                        {
                            he[i]        = new RethrowException(i);
                            mv_Thread[i] = new Thread(new ThreadStart(he[i].runtest));
                            try {
                                mv_Thread[i].Start();
                            }
                            catch (Exception) {
                                Console.WriteLine("Exception was caught in main");
                            }
                        }
                        for (int i = 0; i < 10; i++)
                        {
                            mv_Thread[i].Join();
                        }
                        Console.WriteLine("\n\n Test Passed");
                        Console.WriteLine(s);
                        retVal = 100;
                        return(retVal);
                    }
コード例 #2
0
 protected internal override void VisitRethrowException(RethrowException node, object data)
 {
     if (!(node.Parent is CatchBlock || node.Parent is UserFilteredBlock))
     {
         throw new VerifierException();
     }
 }
コード例 #3
0
ファイル: rethrow.cs プロジェクト: CheneyWu/coreclr
	public static int Main(String[] args) {
	  String s = "Done";
	    System.IO.TextWriter t = Console.Out;
	    Console.SetOut(t);
	    int retVal = 101;
	    	Thread[] mv_Thread = new Thread[10];
		RethrowException[] he = new RethrowException[12];
		for (int i = 0 ; i < 10 ; i++){
			he[i] = new RethrowException(i);
			mv_Thread[i] = new Thread(new ThreadStart(he[i].runtest));
			try {
				mv_Thread[i].Start();
			}
			catch (Exception ){
				Console.WriteLine("Exception was caught in main");
			}
		}
		for (int i = 0; i < 10; i++){
		    mv_Thread[i].Join();
		}
		Console.WriteLine("\n\n Test Passed");
		Console.WriteLine(s);
		retVal = 100;
                return retVal;
	}
コード例 #4
0
ファイル: State.cs プロジェクト: PlumpMath/cilpe-1
 protected override void VisitRethrowException(RethrowException node, object data)
 {
     result = false;
 }
コード例 #5
0
 protected override void VisitRethrowException(RethrowException node, object data)
 {
     throw new NodeNotSupportedException(node);
 }
コード例 #6
0
ファイル: Visitor.cs プロジェクト: PlumpMath/cilpe-1
 protected internal virtual void VisitRethrowException(RethrowException node, object data)
 {
     throw new NodeNotSupportedException(node);
 }