From 165cdc13597a68b2d647f71fb7534b3e11d33a89 Mon Sep 17 00:00:00 2001 From: "jozsef.b@aycode.com" <9Rj@D}fVwBaN> Date: Sat, 1 Jun 2024 13:12:01 +0200 Subject: [PATCH] SignalRAttribute imrpovements --- .../SignalRs/SignalMessageTagAttribute.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/AyCode.Services/SignalRs/SignalMessageTagAttribute.cs b/AyCode.Services/SignalRs/SignalMessageTagAttribute.cs index 065db8a..0fb1e56 100644 --- a/AyCode.Services/SignalRs/SignalMessageTagAttribute.cs +++ b/AyCode.Services/SignalRs/SignalMessageTagAttribute.cs @@ -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; -} \ No newline at end of file +[AttributeUsage(AttributeTargets.Method)] +public class SignalRAttribute(int messageTag) : TagAttribute(messageTag) +{ +}