From d352bc69ea7b25352f06575b8f4e0bf964b9d75d Mon Sep 17 00:00:00 2001 From: Timerix Date: Wed, 29 Sep 2021 18:28:06 +0300 Subject: [PATCH] delegates replased with events in PublicLog --- PublicLog.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/PublicLog.cs b/PublicLog.cs index c541629..4ae26b1 100644 --- a/PublicLog.cs +++ b/PublicLog.cs @@ -7,7 +7,10 @@ { public delegate void LogDelegate(params string[] msg); // вот к этому объекту подключайте методы для вывода логов - public static LogDelegate Log; - public static LogDelegate LogNoTime; + public static event LogDelegate LogEvent; + public static void Log(params string[] msg) => LogEvent?.Invoke(msg); + + public static event LogDelegate LogNoTimeEvent; + public static void LogNoTime(params string[] msg) => LogNoTimeEvent?.Invoke(msg); } }