Ejemplo n.º 1
0
        public static bool Unload(WCellAddonContext context)
        {
            IWCellAddon addon = context.Addon;

            if (addon == null)
            {
                return(false);
            }
            Logger currentClassLogger = LogManager.GetCurrentClassLogger();

            currentClassLogger.Info("Unloading Addon: " + context + " ...");
            TearDown(addon);
            Contexts.Remove(context);
            ContextsByFile.Remove(context.File.FullName);
            ContextsByName.Remove(context.ShortName);
            ContextsByTypeName.Remove(addon.GetType().FullName);
            currentClassLogger.Info("Done. - Unloaded Addon: " + context);
            return(true);
        }
Ejemplo n.º 2
0
 /// <summary>
 ///
 /// </summary>
 public static string GetDefaultDescription(this IWCellAddon addon)
 {
     return(String.Format("{0} v{1} by {2} ({3})", addon.Name, addon.GetType().Assembly.GetName().Version, addon.Author, addon.Website));
 }