mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 05:47:43 +01:00
Add ClientStatePluginScoped (#1384)
* Add ClientStatePluginScoped * Restore InvokeSafely * Add InvokeSafely for basic Action types. * Set delegates to null to prevent leaking memory * Resolve Merge
This commit is contained in:
parent
201a927952
commit
b742abe77f
8 changed files with 165 additions and 37 deletions
|
|
@ -44,7 +44,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
private NetworkHandlers(GameNetwork gameNetwork)
|
||||
{
|
||||
this.uploader = new UniversalisMarketBoardUploader();
|
||||
this.CfPop = (_, _) => { };
|
||||
this.CfPop = _ => { };
|
||||
|
||||
this.messages = Observable.Create<NetworkMessage>(observer =>
|
||||
{
|
||||
|
|
@ -75,7 +75,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
/// <summary>
|
||||
/// Event which gets fired when a duty is ready.
|
||||
/// </summary>
|
||||
public event EventHandler<ContentFinderCondition> CfPop;
|
||||
public event Action<ContentFinderCondition> CfPop;
|
||||
|
||||
/// <summary>
|
||||
/// Disposes of managed and unmanaged resources.
|
||||
|
|
@ -430,7 +430,7 @@ internal class NetworkHandlers : IDisposable, IServiceType
|
|||
Service<ChatGui>.GetNullable()?.Print($"Duty pop: {cfcName}");
|
||||
}
|
||||
|
||||
this.CfPop.InvokeSafely(this, cfCondition);
|
||||
this.CfPop.InvokeSafely(cfCondition);
|
||||
}).ContinueWith(
|
||||
task => Log.Error(task.Exception, "CfPop.Invoke failed"),
|
||||
TaskContinuationOptions.OnlyOnFaulted);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue