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) +{ +}