using System; 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. /// Action? OnInitialized { get; set; } /// /// Event triggered when the method is called successfully. /// Action? OnFinalized { get; set; } /// /// The value indicating whether the entity has been initialized. /// bool Initialized { 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(); }