LoadDll() private method

Loads a pre-compiled assembly, and processes it.
private LoadDll ( ) : bool
return bool
コード例 #1
0
ファイル: Script.cs プロジェクト: manpl/nppsharp
 /// <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);
     }
 }
コード例 #2
0
ファイル: Script.cs プロジェクト: cmrazek/NppSharp
 /// <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;
     }
 }