2023-11-21 21:37:50 +01:00
|
|
|
// Copyright (c) 2023 Timothy Schenk. Subject to the GNU AGPL Version 3 License.
|
2023-11-20 19:58:30 +01:00
|
|
|
|
2024-02-04 19:52:45 +01:00
|
|
|
namespace Rai.PacketMediator;
|
2023-08-12 23:02:59 +02:00
|
|
|
|
|
|
|
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
|
2024-02-04 19:52:45 +01:00
|
|
|
public abstract class PacketIdAttribute<T> : Attribute where T : Enum
|
2023-08-12 23:02:59 +02:00
|
|
|
{
|
2024-02-04 19:52:45 +01:00
|
|
|
protected PacketIdAttribute(T code)
|
2023-11-19 17:07:28 +01:00
|
|
|
{
|
|
|
|
Code = code;
|
|
|
|
}
|
|
|
|
|
2024-02-04 19:52:45 +01:00
|
|
|
public T Code { get; }
|
2023-08-12 23:02:59 +02:00
|
|
|
}
|