namespace Syntriax.Engine.Core.Abstract;
///
/// Represents an entity that can be initialized and finalized. This information is useful for objects we know that are not in use and can be either recycled or dropped for garbage collection.
///
public interface IInitialize
{
///
/// Event triggered when the method is called successfully.
///
event OnInitializedEventHandler? OnInitialized;
///
/// Event triggered when the method is called successfully.
///
event OnFinalizedEventHandler? OnFinalized;
///
/// The value indicating whether the entity has been initialized.
///
bool IsInitialized { get; }
///
/// Initializes the entity.
///
/// if initialization is successful, otherwise .
bool Initialize();
///
/// Finalizes the entity so it can either be recycled or garbage collected.
///
/// if finalization is successful, otherwise .
bool Finalize();
delegate void OnInitializedEventHandler(IInitialize sender);
delegate void OnFinalizedEventHandler(IInitialize sender);
}