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
|
|
|
|
2024-02-04 18:52:45 +00:00
|
|
|
namespace Rai.PacketMediator;
|
2023-08-12 21:02:59 +00:00
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
2024-02-05 09:43:04 +00:00
|
|
|
public abstract class PacketIdAttribute<TPacketIdEnum> : Attribute where TPacketIdEnum : Enum
|
2023-08-12 21:02:59 +00:00
|
|
|
{
|
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; }
|
2023-08-12 21:02:59 +00:00
|
|
|
}
|