mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Plugins - Removed plugin info from constructor
This commit is contained in:
1 parent
33bb3ffa6c
commit
1d35a02d5b
49 files changed
+305
-390
No files matched your search
@@ -10,11 +10,6 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
/// </summary>
|
||||
public abstract class Plugin : IDisposable
|
||||
{
|
||||
internal Plugin(PluginInfo pluginInfo)
|
||||
{
|
||||
PluginInfo = pluginInfo ?? throw new ArgumentNullException(nameof(pluginInfo));
|
||||
}
|
||||
|
||||
public PluginInfo PluginInfo { get; internal set; }
|
||||
|
||||
/// <summary>
|
||||
@@ -28,11 +23,6 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
/// </summary>
|
||||
public bool HasConfigurationViewModel { get; protected set; }
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
DisablePlugin();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Called when the plugin is activated
|
||||
/// </summary>
|
||||
@@ -52,21 +42,26 @@ namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
internal void SetEnabled(bool enable)
|
||||
{
|
||||
if (enable && !Enabled)
|
||||
{
|
||||
Enabled = true;
|
||||
EnablePlugin();
|
||||
OnPluginEnabled();
|
||||
}
|
||||
else if (!enable && Enabled)
|
||||
{
|
||||
Enabled = false;
|
||||
DisablePlugin();
|
||||
OnPluginDisabled();
|
||||
}
|
||||
}
|
||||
|
||||
Enabled = enable;
|
||||
public void Dispose()
|
||||
{
|
||||
DisablePlugin();
|
||||
}
|
||||
|
||||
#region Events
|
||||
|
||||
Reference in new issue
Block a user