Compile() приватный Метод

Compiles a .cs script file, and processes the assembly.
private Compile ( ) : bool
Результат bool
Пример #1
0
 /// <summary>
 /// Compiles a .cs script, and processes the assembly.
 /// </summary>
 /// <param name="fileName">The script's file name.</param>
 /// <returns>If the script could be successfully compiled, and contains command methods,
 /// then returns a new script object.  Null otherwise.</returns>
 public static Script CompileScript(string fileName)
 {
     try
     {
         Script script = new Script(fileName);
         if (script.Compile()) return script;
         return null;
     }
     catch (Exception ex)
     {
         Plugin.Output.Show();
         Plugin.Output.WriteLine(OutputStyle.Error, Res.err_script_Compile, fileName, ex.ToString());
         return null;
     }
 }
Пример #2
0
 /// <summary>
 /// Compiles a .cs script, and processes the assembly.
 /// </summary>
 /// <param name="fileName">The script's file name.</param>
 /// <returns>If the script could be successfully compiled, and contains command methods,
 /// then returns a new script object.  Null otherwise.</returns>
 public static Script CompileScript(string fileName)
 {
     try
     {
         Script script = new Script(fileName);
         if (script.Compile())
         {
             return(script);
         }
         return(null);
     }
     catch (Exception ex)
     {
         Plugin.Output.Show();
         Plugin.Output.WriteLine(OutputStyle.Error, Res.err_script_Compile, fileName, ex.ToString());
         return(null);
     }
 }