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,12 +8,12 @@ public interface IInitialize
/// <summary>
/// Event triggered when the <see cref="Initialize"/> method is called successfully.
/// </summary>
Action<IInitialize>? OnInitialized { get; set; }
event OnInitializedDelegate? OnInitialized;
/// <summary>
/// Event triggered when the <see cref="Finalize"/> method is called successfully.
/// </summary>
Action<IInitialize>? OnFinalized { get; set; }
event OnFinalizedDelegate? OnFinalized;
/// <summary>
/// The value indicating whether the entity has been initialized.
@@ -33,4 +31,7 @@ public interface IInitialize
/// </summary>
/// <returns><see cref="true"/> if finalization is successful, otherwise <see cref="false"/>.</returns>
bool Finalize();
delegate void OnInitializedDelegate(IInitialize sender);
delegate void OnFinalizedDelegate(IInitialize sender);
}