continuity/Rai.PacketMediator/PacketIdAttribute.cs

15 lines
396 B
C#
Raw Normal View History

2023-11-21 20:37:50 +00:00
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
2023-11-20 18:58:30 +00:00
namespace Rai.PacketMediator;
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
2024-02-05 09:43:04 +00:00
public abstract class PacketIdAttribute<TPacketIdEnum> : Attribute where TPacketIdEnum : Enum
{
2024-02-05 09:43:04 +00:00
protected PacketIdAttribute(TPacketIdEnum code)
2023-11-19 16:07:28 +00:00
{
Code = code;
}
2024-02-05 09:43:04 +00:00
public TPacketIdEnum Code { get; }
}