mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 03:48:56 +00:00
Plugins - Reworked bootstrapper
This commit is contained in:
1 parent
5cae14efd3
commit
21700aaad5
13 files changed
+288
-135
No files matched your search
@@ -0,0 +1,21 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Artemis.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a type that has prerequisites
|
||||
/// </summary>
|
||||
public interface IPrerequisitesSubject
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a list of prerequisites for this plugin
|
||||
/// </summary>
|
||||
List<PluginPrerequisite> Prerequisites { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Determines whether the prerequisites of this plugin are met
|
||||
/// </summary>
|
||||
bool ArePrerequisitesMet();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Collections.Generic;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
@@ -11,24 +12,6 @@ namespace Artemis.Core
|
||||
{
|
||||
private PluginPrerequisiteAction? _currentAction;
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="PluginPrerequisite" /> class
|
||||
/// </summary>
|
||||
/// <param name="plugin">The plugin this is a prerequisite for</param>
|
||||
protected PluginPrerequisite(Plugin plugin)
|
||||
{
|
||||
Plugin = plugin;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates a new instance of the <see cref="PluginPrerequisite" /> class
|
||||
/// </summary>
|
||||
/// <param name="pluginFeature">The plugin feature this is a prerequisite for</param>
|
||||
protected PluginPrerequisite(PluginFeature pluginFeature)
|
||||
{
|
||||
PluginFeature = pluginFeature;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the prerequisite
|
||||
/// </summary>
|
||||
@@ -63,18 +46,6 @@ namespace Artemis.Core
|
||||
private set => SetAndNotify(ref _currentAction, value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the plugin this prerequisite is for
|
||||
/// <para>Note: Only one plugin or a plugin feature can be set at once</para>
|
||||
/// </summary>
|
||||
public Plugin? Plugin { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the feature this prerequisite is for
|
||||
/// <para>Note: Only one plugin or a plugin feature can be set at once</para>
|
||||
/// </summary>
|
||||
public PluginFeature? PluginFeature { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Execute all install actions
|
||||
/// </summary>
|
||||
|
||||
Reference in new issue
Block a user