static void Main(string[] args)
 {         	
 	//AppDomain.CurrentDomain.UnhandledException += new  UnhandledExceptionEventHandler((sender,e)=> { Console.WriteLine(e.ExceptionObject); } );
 	 
     if (Control.ModifierKeys == Keys.Shift)
     	showLogViewer();       //.parentForm().width(1000).height(400);                
     var firstScript = AppDomain.CurrentDomain.BaseDirectory.pathCombine("AppScan_Standard_1st_Script.cs");           
     Console.WriteLine("Welcome to the O2 Platform ...");
     Console.WriteLine("Launching IBM AppScan Standard ...");
     
     "Current AppDomain: {0}".info(AppDomain.CurrentDomain.BaseDirectory);
    	
     //CompileEngine.lsGACExtraReferencesToAdd.Clear();
     var assembly = new CompileEngine().compileSourceFile(firstScript);
     if (assembly.notNull())           
     {
         Console.WriteLine("Executing script {0} from location {1}".info(firstScript, assembly.Location));
         if (assembly.methods().size()>0)
         {
             assembly.methods()[0].invoke();
             Console.WriteLine("Invocation complete".info());
         }
         else 
             Console.WriteLine("Error: there were no methods in compiled assembly".error());           
     }
     else
         Console.WriteLine("Error: could not find, compile or execute first script ({0})".error(firstScript));            
 
 }               
Exemplo n.º 2
0
    	public static bool compileAndOpen(this API_NUnit_Gui nUnitGui, string fileToCompile)
    	{
    		var assembly = new CompileEngine().compileSourceFile(fileToCompile);
			if (assembly.notNull())
			{
				var location = assembly.Location; 			
				nUnitGui.openProject(location);			
				return true;
			}
			return false;
    	}
Exemplo n.º 3
0
    	public static bool compileAndOpen(this API_NUnit nUnitApi, string fileToCompile, string extraStartupOptions)
    	{
    		var assembly = new CompileEngine().compileSourceFile(fileToCompile);
			if (assembly.notNull()) 
			{
				var location = assembly.Location; 			
				nUnitApi.openNUnitGui(location, extraStartupOptions);			
				return true;
			}
			return false;
    	}
		public static API_CatNet_GUI scanCSharpFile(this API_CatNet_GUI catNetGui, string file)	
		{
			catNetGui.SolutionLoaded = "";
			catNetGui.TriggerOnSelectedEvent = false;
			var catNet = new API_CatNet().loadRules(); 
			var assembly = new CompileEngine().compileSourceFile(file);
			if (assembly.notNull())			
			{
				catNetGui.openReport(catNet.scan(assembly).savedReport());				
			}
			else
				catNetGui.CodeViewer.open(file);					
			return catNetGui;	
		}