Syntriax.Engine/Engine.Core/Abstract/Assignable/IAssignableStateEnable.cs

27 lines
935 B
C#

using System;
namespace Syntriax.Engine.Core.Abstract;
/// <summary>
/// Indicates the object is an <see cref="IAssignable"/> with an assignable <see cref="IStateEnable"/> field.
/// </summary>
public interface IAssignableStateEnable : IAssignable
{
/// <summary>
/// Event triggered when the <see cref="IStateEnable"/> value has has been assigned a new value.
/// </summary>
Action<IAssignableStateEnable>? OnStateEnableAssigned { get; set; }
/// <inheritdoc cref="IStateEnable" />
IStateEnable StateEnable { get; }
/// <summary>
/// Assign a value to the <see cref="IStateEnable"/> field of this object.
/// </summary>
/// <param name="stateEnable">New <see cref="IStateEnable"/> to assign.</param>
/// <returns>
/// <see cref="true"/>, if the value given assigned successfully assigned, <see cref="false"/> if not.
/// </returns>
bool Assign(IStateEnable stateEnable);
}