SignalRAttribute imrpovements

This commit is contained in:
jozsef.b@aycode.com 2024-06-01 13:12:01 +02:00
parent 0fd78ba482
commit 165cdc1359
1 changed files with 8 additions and 6 deletions

View File

@ -1,10 +1,12 @@
namespace AyCode.Services.SignalRs;
public class SignalMessageTagAttribute(Type requestMessageType, Type responseMessageType, Type controllerType, params Type[] parameters) : Attribute
[AttributeUsage(AttributeTargets.Method)]
public class TagAttribute(int messageTag) : Attribute
{
public Type RequestMessageType { get; } = requestMessageType;
public Type ResponseMessageType { get; } = responseMessageType;
public int MessageTag { get; init; } = messageTag;
}
public Type ControllerType { get; } = controllerType;
public Type[] Parameters { get; } = parameters;
}
[AttributeUsage(AttributeTargets.Method)]
public class SignalRAttribute(int messageTag) : TagAttribute(messageTag)
{
}