feat: IEntity.Id & BaseEntity

This commit is contained in:
2024-02-02 12:11:51 +03:00
parent 5d897f2f56
commit dbb263ebed
5 changed files with 143 additions and 168 deletions

View File

@@ -1,3 +1,5 @@
using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
@@ -5,4 +7,14 @@ namespace Syntriax.Engine.Core.Abstract;
/// </summary>
public interface IEntity : IInitialize, IAssignableStateEnable
{
/// <summary>
/// Event triggered when the <see cref="Id"/> of the <see cref="IEntity"/> changes.
/// The string action parameter is the previous <see cref="Id"/> of the <see cref="IEntity"/>.
/// </summary>
Action<IEntity, string>? OnIdChanged { get; set; }
/// <summary>
/// The ID of the <see cref="IEntity"/>.
/// </summary>
string Id { get; set; }
}