public override void Init(Kernel kernel) { PluginOptions = new PluginConfiguration<PluginOptions>(kernel, this.GetType().Assembly); PluginOptions.Load(); }
public void Init(Kernel config) { pluginInterface.Init(config); }
static Kernel GetDefaultKernel(ConfigData config) { var kernel = new Kernel() { Plugins = DefaultPlugins(), StringData = new LocalizedStrings(), ConfigData = config }; foreach (var plugin in kernel.Plugins.ToList()) { try { plugin.Init(kernel); } catch { kernel.Plugins.Remove(plugin); } } kernel.Plugins.Sort(delegate(IPlugin p1, IPlugin p2) { return p1.Options.Order.CompareTo(p2.Options.Order); }); int index = 0; foreach (var plugin in kernel.Plugins.ToList()) { if (plugin.Options.Order != index) { plugin.Options.Order = index; plugin.Save(); } index++; } kernel.ItemCollection = new ItemCollection(config.RootFolders); kernel.Message = new GenerateMessage(); return kernel; }
public static void ReloadKernel() { kernel = null; Init(); }
public abstract void Init(Kernel kernel);
public void Init(Kernel kernel) { }