Added FisheryLib.Collections.FishTable and Mono.Cecil extension methods
A bit of refactoring has been done too
This commit is contained in:
+12
-10
@@ -3,22 +3,24 @@
|
||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
// file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace FisheryLib;
|
||||
|
||||
[PublicAPI]
|
||||
public static class Log
|
||||
{
|
||||
public static void Message(string message) => _message(message);
|
||||
public static void Warning(string message) => _warning(message);
|
||||
public static void Error(string message) => _error(message);
|
||||
public static void Message(string message) => Config.Message(message);
|
||||
public static void Warning(string message) => Config.Warning(message);
|
||||
public static void Error(string message) => Config.Error(message);
|
||||
|
||||
[PublicAPI]
|
||||
public static class Config
|
||||
{
|
||||
public static Action<string> Message { set => _message = value; }
|
||||
public static Action<string> Warning { set => _warning = value; }
|
||||
public static Action<string> Error { set => _error = value; }
|
||||
}
|
||||
public static Action<string> Message { get; set; } = static text => Verse.Log.Message(text);
|
||||
|
||||
private static Action<string> _message = Verse.Log.Message;
|
||||
private static Action<string> _warning = Verse.Log.Warning;
|
||||
private static Action<string> _error = Verse.Log.Error;
|
||||
public static Action<string> Warning { get; set; } = static text => Verse.Log.Warning(text);
|
||||
|
||||
public static Action<string> Error { get; set; } = static text => Verse.Log.Error(text);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user