refactor: Actions to Delegates

This commit is contained in:
2024-07-15 01:13:39 +03:00
parent 2cf6135063
commit ef21cdf213
30 changed files with 157 additions and 134 deletions

View File

@@ -1,5 +1,3 @@
using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
@@ -10,7 +8,7 @@ public interface IAssignable
/// <summary>
/// Event triggered when the <see cref="IAssignable"/>'s fields are unassigned and completely ready to recycle.
/// </summary>
Action<IAssignable>? OnUnassigned { get; set; }
event OnUnassignedDelegate? OnUnassigned;
/// <summary>
/// Unassign <see cref="IAssignable"/>'s all fields and make it ready to recycle.
@@ -19,4 +17,6 @@ public interface IAssignable
/// <see cref="true"/>, if the fields are unsigned successfully, <see cref="false"/> if not.
/// </returns>
bool Unassign();
delegate void OnUnassignedDelegate(IAssignable sender);
}