Пример #1
0
    public static void Main(String[] args)
    {
        Boolean           bResult      = false;
        Co6661GetNextArgs oReplaceTest = new Co6661GetNextArgs();

        Console.WriteLine("Starting " + strName + " ...");
        Console.WriteLine("USAGE:  Co6661GetNextArgs.exe OR Co6661GetNextArgs.exe verbose");
        Boolean verbose = false;

        try
        {
            if (args.Length > 0)
            {
                Console.WriteLine("Verbose ON!");
                verbose = true;
            }
            Console.WriteLine();
            bResult = oReplaceTest.runTest(verbose);
        }
        catch (Exception exc_main) {
            bResult = false;
            Console.Error.WriteLine(strName + " " + strTest + " " + strPath);
            Console.Error.WriteLine("Unexpected Exception (Main99): " + exc_main.ToString());
        }
        if (!bResult)
        {
            Console.Error.WriteLine("PATHTOSOURCE: (FAIL) " + strPath + strTest);
        }
        if (bResult == true)
        {
            Environment.ExitCode = 0;
        }
        else
        {
            Environment.ExitCode = 11;
        }
    }
 public static void Main( String[] args ) 
   {
   Boolean bResult = false;	
   Co6661GetNextArgs oReplaceTest = new Co6661GetNextArgs();
   Console.WriteLine( "Starting "+ strName +" ..." );                                               	
   Console.WriteLine( "USAGE:  Co6661GetNextArgs.exe OR Co6661GetNextArgs.exe verbose" );
   Boolean verbose=false;
   try
     {			
     if ( args.Length > 0 ) {
     Console.WriteLine( "Verbose ON!" );
     verbose = true;
     }
     Console.WriteLine();                                                                        
     bResult = oReplaceTest.runTest(verbose);				
     }
   catch ( Exception exc_main ) {
   bResult = false;
   Console.Error.WriteLine (strName+" "+strTest+" "+strPath);
   Console.Error.WriteLine ("Unexpected Exception (Main99): "+exc_main.ToString());
   }
   if ( ! bResult )
     Console.Error.WriteLine(  "PATHTOSOURCE: (FAIL) " + strPath + strTest );
   if ( bResult == true ) Environment.ExitCode = 0; else Environment.ExitCode = 11;
   }