mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Use past tense
This commit is contained in:
parent
089f0c9495
commit
bac45c5e30
3 changed files with 19 additions and 7 deletions
|
|
@ -5,15 +5,27 @@ namespace Dalamud.Plugin;
|
|||
/// <summary>
|
||||
/// Contains data about changes to the list of active plugins.
|
||||
/// </summary>
|
||||
public class ActivePluginsChangedEventArgs(PluginListInvalidationKind kind, IEnumerable<string> affectedInternalNames) : EventArgs
|
||||
public class ActivePluginsChangedEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivePluginsChangedEventArgs"/> class
|
||||
/// with the specified parameters.
|
||||
/// </summary>
|
||||
/// <param name="kind">The kind of change that triggered the event.</param>
|
||||
/// <param name="affectedInternalNames">The internal names of the plugins affected by the change.</param>
|
||||
internal ActivePluginsChangedEventArgs(PluginListInvalidationKind kind, IEnumerable<string> affectedInternalNames)
|
||||
{
|
||||
this.Kind = kind;
|
||||
this.AffectedInternalNames = affectedInternalNames;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the invalidation kind that caused this event to be fired.
|
||||
/// </summary>
|
||||
public PluginListInvalidationKind Kind { get; } = kind;
|
||||
public PluginListInvalidationKind Kind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the InternalNames of affected plugins.
|
||||
/// </summary>
|
||||
public IEnumerable<string> AffectedInternalNames { get; } = affectedInternalNames;
|
||||
public IEnumerable<string> AffectedInternalNames { get; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -397,7 +397,7 @@ internal class LocalPlugin : IAsyncDisposable
|
|||
Log.Information("Finished loading {PluginName}", this.InternalName);
|
||||
|
||||
var manager = Service<PluginManager>.Get();
|
||||
manager.NotifyPluginsForStateChange(PluginListInvalidationKind.Load, [this.manifest.InternalName]);
|
||||
manager.NotifyPluginsForStateChange(PluginListInvalidationKind.Loaded, [this.manifest.InternalName]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
@ -475,7 +475,7 @@ internal class LocalPlugin : IAsyncDisposable
|
|||
Log.Information("Finished unloading {PluginName}", this.InternalName);
|
||||
|
||||
var manager = Service<PluginManager>.Get();
|
||||
manager.NotifyPluginsForStateChange(PluginListInvalidationKind.Unload, [this.manifest.InternalName]);
|
||||
manager.NotifyPluginsForStateChange(PluginListInvalidationKind.Unloaded, [this.manifest.InternalName]);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,12 +8,12 @@ public enum PluginListInvalidationKind
|
|||
/// <summary>
|
||||
/// A plugin was loaded.
|
||||
/// </summary>
|
||||
Load,
|
||||
Loaded,
|
||||
|
||||
/// <summary>
|
||||
/// A plugin was unloaded.
|
||||
/// </summary>
|
||||
Unload,
|
||||
Unloaded,
|
||||
|
||||
/// <summary>
|
||||
/// An installer-initiated update reloaded plugins.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue