Exemplo n.º 1
0
 public FusionException(string message, string fusionLog, Assembly assembly, Type type, MirandaPlugin plugin, Exception inner) : base(message, inner)
 {
     this.assembly = assembly;
     this.pluginType = type;
     this.instantiatedPlugin = plugin;
     this.fusionLog = fusionLog;
 }
Exemplo n.º 2
0
 public static DefaultExceptionHandler Create(MirandaPlugin plugin)
 {
     return new DefaultExceptionHandler(plugin);
 }
Exemplo n.º 3
0
 private DefaultExceptionHandler(MirandaPlugin plugin)
 {
     this.plugin = plugin;
 }
Exemplo n.º 4
0
 public static void BeginPluginUpdate(MirandaPlugin plugin)
 {
     VerifyNotNull(plugin);
     Monitor.Enter(plugin);
 }
Exemplo n.º 5
0
 public FusionException(string message, Assembly assembly, Type type, MirandaPlugin plugin, Exception inner)
     : this(message, TextResources.UI_Label_Empty, assembly, type, plugin, inner)
 { }
Exemplo n.º 6
0
        private void LoadAssembly(string path, ref Assembly currentAssembly, ref Type currentType, ref MirandaPlugin currentPlugin)
        {
            Log.DebuggerWrite(0, LogCategory, "Loading assembly '" + path + "'...");

            try
            {
                currentAssembly = Assembly.Load(Path.GetFileNameWithoutExtension(path));

                foreach (Type type in GetExposedPlugins(currentAssembly))
                    LoadPluginFromType(currentType = type);
            }
            catch (BadImageFormatException bifE)
            {
                throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_UnmanagedImageFound, path), bifE.FusionLog, null, null, null, bifE);
            }
            catch (FileNotFoundException fnfE)
            {
                throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_AssemblyLoadError, currentAssembly != null ? currentAssembly.ToString() : path), fnfE.FusionLog, currentAssembly, currentType, null, fnfE);
            }
            catch (FusionException)
            {
                throw;
            }
            catch (Exception e)
            {
                throw new FusionException(String.Format(TextResources.ExceptionMsg_Formatable1_AssemblyLoadError, path, e.Message), currentAssembly.ToString(), null, null, null, e);
            }
        }