Plugins - Reworked bootstrapper

This commit is contained in:
Robert committed 2021-04-30 17:39:58 +02:00
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>