mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-31 21:03:43 +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;
|
namespace Dalamud.Plugin;
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc cref="IActivePluginsChangedEventArgs" />
|
||||||
/// Contains data about changes to the list of active plugins.
|
public class ActivePluginsChangedEventArgs : EventArgs, IActivePluginsChangedEventArgs
|
||||||
/// </summary>
|
|
||||||
public class ActivePluginsChangedEventArgs : EventArgs
|
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initializes a new instance of the <see cref="ActivePluginsChangedEventArgs"/> class
|
/// Initializes a new instance of the <see cref="ActivePluginsChangedEventArgs"/> class
|
||||||
|
|
@ -19,13 +17,9 @@ public class ActivePluginsChangedEventArgs : EventArgs
|
||||||
this.AffectedInternalNames = affectedInternalNames;
|
this.AffectedInternalNames = affectedInternalNames;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc/>
|
||||||
/// Gets the invalidation kind that caused this event to be fired.
|
|
||||||
/// </summary>
|
|
||||||
public PluginListInvalidationKind Kind { get; }
|
public PluginListInvalidationKind Kind { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <inheritdoc/>
|
||||||
/// Gets the InternalNames of affected plugins.
|
|
||||||
/// </summary>
|
|
||||||
public IEnumerable<string> AffectedInternalNames { get; }
|
public IEnumerable<string> AffectedInternalNames { get; }
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -489,7 +489,7 @@ internal sealed class DalamudPluginInterface : IDalamudPluginInterface, IDisposa
|
||||||
/// Dispatch the active plugins changed event.
|
/// Dispatch the active plugins changed event.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">The event arguments containing information about the change.</param>
|
/// <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))
|
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.
|
/// Delegate for events that listen to changes to the list of active plugins.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="args">The event arguments containing information about the change.</param>
|
/// <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>
|
/// <summary>
|
||||||
/// Event that gets fired when loc is changed
|
/// Event that gets fired when loc is changed
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue