mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-30 20:33:40 +01:00
Interface ActivePluginsChangeEventArgs (#2341)
This commit is contained in:
parent
6213f7627e
commit
8d29e6b44d
4 changed files with 25 additions and 12 deletions
|
|
@ -2,10 +2,8 @@ using System.Collections.Generic;
|
|||
|
||||
namespace Dalamud.Plugin;
|
||||
|
||||
/// <summary>
|
||||
/// Contains data about changes to the list of active plugins.
|
||||
/// </summary>
|
||||
public class ActivePluginsChangedEventArgs : EventArgs
|
||||
/// <inheritdoc cref="IActivePluginsChangedEventArgs" />
|
||||
public class ActivePluginsChangedEventArgs : EventArgs, IActivePluginsChangedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ActivePluginsChangedEventArgs"/> class
|
||||
|
|
@ -19,13 +17,9 @@ public class ActivePluginsChangedEventArgs : EventArgs
|
|||
this.AffectedInternalNames = affectedInternalNames;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets the invalidation kind that caused this event to be fired.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
public PluginListInvalidationKind Kind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the InternalNames of affected plugins.
|
||||
/// </summary>
|
||||
/// <inheritdoc/>
|
||||
public IEnumerable<string> AffectedInternalNames { get; }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -489,7 +489,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
|||
/// Dispatch the active plugins changed event.
|
||||
/// </summary>
|
||||
/// <param name="args">The event arguments containing information about the change.</param>
|
||||
internal void NotifyActivePluginsChanged(ActivePluginsChangedEventArgs args)
|
||||
internal void NotifyActivePluginsChanged(IActivePluginsChangedEventArgs args)
|
||||
{
|
||||
foreach (var action in Delegate.EnumerateInvocationList(this.ActivePluginsChanged))
|
||||
{
|
||||
|
|
|
|||
19
Dalamud/Plugin/IActivePluginsChangedEventArgs.cs
Normal file
19
Dalamud/Plugin/IActivePluginsChangedEventArgs.cs
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
namespace Dalamud.Plugin;
|
||||
|
||||
/// <summary>
|
||||
/// Contains data about changes to the list of active plugins.
|
||||
/// </summary>
|
||||
public interface IActivePluginsChangedEventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the invalidation kind that caused this event to be fired.
|
||||
/// </summary>
|
||||
PluginListInvalidationKind Kind { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the InternalNames of affected plugins.
|
||||
/// </summary>
|
||||
IEnumerable<string> AffectedInternalNames { get; }
|
||||
}
|
||||
|
|
@ -33,7 +33,7 @@ public interface IDalamudPluginInterface
|
|||
/// Delegate for events that listen to changes to the list of active plugins.
|
||||
/// </summary>
|
||||
/// <param name="args">The event arguments containing information about the change.</param>
|
||||
public delegate void ActivePluginsChangedDelegate(ActivePluginsChangedEventArgs args);
|
||||
public delegate void ActivePluginsChangedDelegate(IActivePluginsChangedEventArgs args);
|
||||
|
||||
/// <summary>
|
||||
/// Event that gets fired when loc is changed
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue