breaking: obsolete ReplaceHandler

This commit is contained in:
vis2k 2021-05-13 12:08:25 +08:00
parent b7a6932b93
commit a1866595ac
2 changed files with 4 additions and 2 deletions

View File

@ -334,7 +334,7 @@ public static void RegisterHandler<T>(Action<T> handler, bool requireAuthenticat
}
/// <summary>Replace a handler for a particular message type. Should require authentication by default.</summary>
// TODO does anyone even use that? consider removing
[Obsolete("We are considering to remove ReplaceHandler<T>. If you have a good reason why we should keep it, please let us know.")]
public static void ReplaceHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{
@ -343,7 +343,7 @@ public static void ReplaceHandler<T>(Action<NetworkConnection, T> handler, bool
}
/// <summary>Replace a handler for a particular message type. Should require authentication by default.</summary>
// TODO does anyone even use that? consider removing
[Obsolete("We are considering to remove ReplaceHandler<T>. If you have a good reason why we should keep it, please let us know.")]
public static void ReplaceHandler<T>(Action<T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{

View File

@ -469,6 +469,7 @@ public static void RegisterHandler<T>(Action<T> handler, bool requireAuthenticat
}
/// <summary>Replace a handler for message type T. Most should require authentication.</summary>
[Obsolete("We are considering to remove ReplaceHandler<T>. If you have a good reason why we should keep it, please let us know.")]
public static void ReplaceHandler<T>(Action<NetworkConnection, T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{
@ -477,6 +478,7 @@ public static void ReplaceHandler<T>(Action<NetworkConnection, T> handler, bool
}
/// <summary>Replace a handler for message type T. Most should require authentication.</summary>
[Obsolete("We are considering to remove ReplaceHandler<T>. If you have a good reason why we should keep it, please let us know.")]
public static void ReplaceHandler<T>(Action<T> handler, bool requireAuthentication = true)
where T : struct, NetworkMessage
{