refactor: use specific method instead of string
All checks were successful
Test if Server can be built / build-server (push) Successful in 23s

This commit is contained in:
Timothy Schenk 2023-10-27 18:17:26 +02:00
parent 59ba0ece7f
commit 2550f597a9

View file

@ -137,7 +137,7 @@ public class PacketDistributorService : IHostedService
var packet = this.deserializationMap[item.OperationCode](item.MessageBody);
this.logger.PacketData(JsonConvert.SerializeObject(packet));
this.packetHandlersInstantiation[item.OperationCode].GetType().GetMethod("HandleAsync")
this.packetHandlersInstantiation[item.OperationCode].GetType().GetMethod(nameof(IPacketHandler<IPacket>.HandleAsync))
?.Invoke(this.packetHandlersInstantiation[item.OperationCode], new object[] { packet, item.Session });
this.logger.PacketFinished(item.Session.Id, item.OperationCode);