fix(NetworkServer): Suppress obsolete warnings

This commit is contained in:
MrGadget 2024-07-20 12:45:21 -04:00
parent 350d9cd5b2
commit 86d8bc912c

View File

@ -191,7 +191,9 @@ static void Initialize()
static void AddTransportHandlers()
{
// += so that other systems can also hook into it (i.e. statistics)
#pragma warning disable CS0618 // Type or member is obsolete
Transport.active.OnServerConnected += OnTransportConnected;
#pragma warning restore CS0618 // Type or member is obsolete
Transport.active.OnServerConnectedWithAddress += OnTransportConnectedWithAddress;
Transport.active.OnServerDataReceived += OnTransportData;
Transport.active.OnServerDisconnected += OnTransportDisconnected;
@ -264,7 +266,9 @@ public static void Shutdown()
static void RemoveTransportHandlers()
{
// -= so that other systems can also hook into it (i.e. statistics)
#pragma warning disable CS0618 // Type or member is obsolete
Transport.active.OnServerConnected -= OnTransportConnected;
#pragma warning restore CS0618 // Type or member is obsolete
Transport.active.OnServerConnectedWithAddress -= OnTransportConnectedWithAddress;
Transport.active.OnServerDataReceived -= OnTransportData;
Transport.active.OnServerDisconnected -= OnTransportDisconnected;