namespace AyCode.Services.SignalRs;

/// <summary>
/// 
/// </summary>
/// <param name="messageTag">Milyen SignalR tag-eket fogadjon a metódus</param>
[AttributeUsage(AttributeTargets.Method)]
public class TagAttribute(int messageTag) : Attribute
{
    public int MessageTag { get; init; } = messageTag;
}

/// <summary>
/// 
/// </summary>
/// <param name="messageTag">Milyen SignalR tag-eket fogadjon a metódus.</param>
/// <param name="sendToOtherClientTag">Milyen Tag-el küldje ki a többi kliens-nek a response-t.</param>
/// <param name="sendToOtherClientType">Kiknek küldje még el a response-t.</param>
/// <param name="sendToOtherClientNotificationMessage">Notification message. Jelenleg nincs implementálva!</param>
[AttributeUsage(AttributeTargets.Method)]
public class SignalRAttribute(int messageTag, int sendToOtherClientTag = 0, SendToClientType sendToOtherClientType = SendToClientType.None, string? sendToOtherClientNotificationMessage = null) : TagAttribute(messageTag)
{
    public int SendToOtherClientTag { get; init; } = sendToOtherClientTag;
    public SendToClientType SendToOtherClientType { get; init; } = sendToOtherClientType;
    public string? SendToOtherClientNotificationMessage { get; init; } = sendToOtherClientNotificationMessage;
}

[AttributeUsage(AttributeTargets.Method)]
public class SignalRSendToClientAttribute(int messageTag) : TagAttribute(messageTag)
{
}