LoadDll() private method

Loads a pre-compiled assembly, and processes it.
private LoadDll ( ) : bool
return bool
Beispiel #1
0
 /// <summary>
 /// Loads a pre-compiled assembly and processes it.
 /// </summary>
 /// <param name="fileName">The assembly's file name.</param>
 /// <returns>If the assembly could be loaded, and contains command methods, then it returns
 /// a new script object.  Null otherwise.</returns>
 public static Script LoadAssembly(string fileName)
 {
     try
     {
         Script script = new Script(fileName);
         if (script.LoadDll())
         {
             return(script);
         }
         return(null);
     }
     catch (Exception ex)
     {
         Plugin.Output.Show();
         Plugin.Output.WriteLine(OutputStyle.Error, Res.err_script_LoadDll, fileName, ex.ToString());
         return(null);
     }
 }
Beispiel #2
0
 /// <summary>
 /// Loads a pre-compiled assembly and processes it.
 /// </summary>
 /// <param name="fileName">The assembly's file name.</param>
 /// <returns>If the assembly could be loaded, and contains command methods, then it returns
 /// a new script object.  Null otherwise.</returns>
 public static Script LoadAssembly(string fileName)
 {
     try
     {
         Script script = new Script(fileName);
         if (script.LoadDll()) return script;
         return null;
     }
     catch (Exception ex)
     {
         Plugin.Output.Show();
         Plugin.Output.WriteLine(OutputStyle.Error, Res.err_script_LoadDll, fileName, ex.ToString());
         return null;
     }
 }