Syntriax 61e2761580 perf!: events refactored throughout all the project to use Event<> class
All delegate events are refactored to use the Event<TSender> and Event<TSender, TArgument> for performance issues regarding delegate events creating garbage, also this gives us better control on event invocation since C# Delegates did also create unnecessary garbage during Delegate.DynamicInvoke
2025-05-31 00:32:58 +03:00

20 lines
466 B
C#

namespace Syntriax.Engine.Core;
/// <summary>
/// Represents an entity with a name.
/// </summary>
public interface INameable
{
/// <summary>
/// Event triggered when the name of the entity changes.
/// </summary>
Event<INameable, NameChangedArguments> OnNameChanged { get; }
/// <summary>
/// The name of the entity.
/// </summary>
string Name { get; set; }
readonly record struct NameChangedArguments(string PreviousName);
}