Ejemplo n.º 1
0
 static void CompileAllFiles()
 {
     CSharpScript.Compiler
         cSharpScriptCompiler = new CSharpScript.Compiler();
         cSharpScriptCompiler.OnErrorOccured += new EventHandler<CSharpScript.NotificationDetails>( cSharpScriptCompiler_ErrorOccured );
         cSharpScriptCompiler.OnWarningOccured += new EventHandler<CSharpScript.NotificationDetails>( cSharpScriptCompiler_WarningOccured );
         cSharpScriptCompiler.CompileScriptFiles( Directory.GetFiles( @"..\..\..\Examples\Example 01 Transportable", "*.chs" ) );
 }
Ejemplo n.º 2
0
        static void ConvertOneFile()
        {
            CSharpScript.Compiler cSharpScriptCompiler = new CSharpScript.Compiler();

            string file = @"C:\Users\nicu\Projects\C Sharp Script\CSharpScript\Examples\Example 01 Transportable\ITransportable.chs";
            StreamWriter
                sw = new StreamWriter( file + ".cs" );
                sw.Write( cSharpScriptCompiler.TransformScriptFileToCSharp( file ) );
                sw.Close();
        }
Ejemplo n.º 3
0
        static void ConvertAllFiles()
        {
            CSharpScript.Compiler cSharpScriptCompiler = new CSharpScript.Compiler();

            foreach( string file in Directory.GetFiles( @"..\..\..\Examples\Example 01 Transportable", "*.chs" ) )
            {
                StreamWriter
                    sw = new StreamWriter( file + ".cs" );
                    sw.Write( cSharpScriptCompiler.TransformScriptFileToCSharp( file ) );
                    sw.Close();
            }
        }