SignalRAttribute imrpovements
This commit is contained in:
parent
0fd78ba482
commit
165cdc1359
|
|
@ -1,10 +1,12 @@
|
||||||
namespace AyCode.Services.SignalRs;
|
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 int MessageTag { get; init; } = messageTag;
|
||||||
|
}
|
||||||
|
|
||||||
|
[AttributeUsage(AttributeTargets.Method)]
|
||||||
|
public class SignalRAttribute(int messageTag) : TagAttribute(messageTag)
|
||||||
{
|
{
|
||||||
public Type RequestMessageType { get; } = requestMessageType;
|
|
||||||
public Type ResponseMessageType { get; } = responseMessageType;
|
|
||||||
|
|
||||||
public Type ControllerType { get; } = controllerType;
|
|
||||||
public Type[] Parameters { get; } = parameters;
|
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue