Add deprecation helper

This commit is contained in:
Łukasz Domeradzki 2024-06-26 13:53:48 +02:00
parent 7eb24d7bd6
commit 11bab46b8b
No known key found for this signature in database
GPG key ID: 6B138B4C64555AEA

View file

@ -249,6 +249,12 @@ public static class PluginsCore {
await plugin.OnLoaded().ConfigureAwait(false);
ASF.ArchiLogger.LogGenericInfo(string.Format(CultureInfo.CurrentCulture, Strings.PluginLoaded, plugin.Name));
#pragma warning disable CS0618 // TODO: Pending removal
if (plugin is IBotTradeOffer) {
ASF.ArchiLogger.LogGenericError(string.Format(CultureInfo.CurrentCulture, Strings.WarningDeprecated, $"{nameof(IBotTradeOffer)} ({plugin.Name})", nameof(IBotTradeOffer2)));
}
#pragma warning restore CS0618 // TODO: Pending removal
} catch (Exception e) {
ASF.ArchiLogger.LogGenericException(e);
invalidPlugins.Add(plugin);