SignalRAttribute imrpovements
This commit is contained in:
parent
0fd78ba482
commit
165cdc1359
|
|
@ -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)
|
||||
{
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue