mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-01-03 14:23:40 +01:00
refactor: move Dalamud.Interface utils into main assembly, warnings pass
This commit is contained in:
parent
758ae7c097
commit
02e1f2502e
80 changed files with 394 additions and 303 deletions
|
|
@ -53,12 +53,6 @@ namespace Dalamud.Plugin.Internal;
|
|||
#pragma warning restore SA1015
|
||||
internal partial class PluginManager : IDisposable, IServiceType
|
||||
{
|
||||
/// <summary>
|
||||
/// The current Dalamud API level, used to handle breaking changes. Only plugins with this level will be loaded.
|
||||
/// As of Dalamud 9.x, this always matches the major version number of Dalamud.
|
||||
/// </summary>
|
||||
public static int DalamudApiLevel => Assembly.GetExecutingAssembly().GetName().Version!.Major;
|
||||
|
||||
/// <summary>
|
||||
/// Default time to wait between plugin unload and plugin assembly unload.
|
||||
/// </summary>
|
||||
|
|
@ -88,6 +82,11 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
[ServiceManager.ServiceDependency]
|
||||
private readonly HappyHttpClient happyHttpClient = Service<HappyHttpClient>.Get();
|
||||
|
||||
static PluginManager()
|
||||
{
|
||||
DalamudApiLevel = typeof(PluginManager).Assembly.GetName().Version!.Major;
|
||||
}
|
||||
|
||||
[ServiceManager.ServiceConstructor]
|
||||
private PluginManager()
|
||||
{
|
||||
|
|
@ -149,6 +148,12 @@ internal partial class PluginManager : IDisposable, IServiceType
|
|||
/// </summary>
|
||||
public event Action? OnAvailablePluginsChanged;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current Dalamud API level, used to handle breaking changes. Only plugins with this level will be loaded.
|
||||
/// As of Dalamud 9.x, this always matches the major version number of Dalamud.
|
||||
/// </summary>
|
||||
public static int DalamudApiLevel { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets a copy of the list of all loaded plugins.
|
||||
/// </summary>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue