From 27af53eb56691349cfbc0aad8a572438ebaf407a Mon Sep 17 00:00:00 2001 From: Timothy Schenk Date: Sun, 13 Aug 2023 14:12:04 +0200 Subject: [PATCH] feat: add usedimplicitly attribute --- Server/PacketHandlers/IPacketHandler.cs | 1 + Server/PacketHandlers/{LoginInfoHandler.cs => LoginHandler.cs} | 0 Server/Packets/IPacket.cs | 3 +++ 3 files changed, 4 insertions(+) rename Server/PacketHandlers/{LoginInfoHandler.cs => LoginHandler.cs} (100%) diff --git a/Server/PacketHandlers/IPacketHandler.cs b/Server/PacketHandlers/IPacketHandler.cs index d5dbadf..238b2aa 100644 --- a/Server/PacketHandlers/IPacketHandler.cs +++ b/Server/PacketHandlers/IPacketHandler.cs @@ -4,6 +4,7 @@ using JetBrains.Annotations; using NetCoreServer; using Packets; +[UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)] public interface IPacketHandler where T : IPacket { [UsedImplicitly] diff --git a/Server/PacketHandlers/LoginInfoHandler.cs b/Server/PacketHandlers/LoginHandler.cs similarity index 100% rename from Server/PacketHandlers/LoginInfoHandler.cs rename to Server/PacketHandlers/LoginHandler.cs diff --git a/Server/Packets/IPacket.cs b/Server/Packets/IPacket.cs index b5f465b..2cf79bd 100644 --- a/Server/Packets/IPacket.cs +++ b/Server/Packets/IPacket.cs @@ -1,5 +1,8 @@ namespace Server.Packets; +using JetBrains.Annotations; + +[UsedImplicitly(ImplicitUseTargetFlags.WithInheritors)] public interface IPacket { public void Deserialize(byte[] data);