T type logging
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
namespace Core.Models.Eft.Ws;
|
||||
|
||||
public enum NotificationEventType
|
||||
{
|
||||
AssortmentUnlockRule,
|
||||
ExamineItems,
|
||||
ExamineAllItems,
|
||||
ForceLogout,
|
||||
RagfairOfferSold,
|
||||
RagfairNewRating,
|
||||
RagfairRatingChange,
|
||||
new_message,
|
||||
ping,
|
||||
TraderSalesSum,
|
||||
trader_supply,
|
||||
TraderStanding,
|
||||
UnlockTrader,
|
||||
groupMatchRaidSettings,
|
||||
groupMatchRaidNotReady,
|
||||
groupMatchRaidReady,
|
||||
groupMatchInviteAccept,
|
||||
groupMatchInviteDecline,
|
||||
groupMatchInviteSend,
|
||||
groupMatchLeaderChanged,
|
||||
groupMatchStartGame,
|
||||
groupMatchUserLeave,
|
||||
groupMatchWasRemoved,
|
||||
groupMatchUserHasBadVersion,
|
||||
userConfirmed,
|
||||
UserMatched,
|
||||
userMatchOver,
|
||||
channel_deleted,
|
||||
friendListRequestAccept,
|
||||
friendListRequestDecline,
|
||||
friendListNewRequest,
|
||||
youAreRemovedFromFriendList,
|
||||
YouWereAddedToIgnoreList,
|
||||
youAreRemoveFromIgnoreList,
|
||||
ProfileLockTimer,
|
||||
StashRows,
|
||||
SkillPoints,
|
||||
tournamentWarning,
|
||||
}
|
||||
@@ -5,8 +5,8 @@ namespace Core.Models.Eft.Ws;
|
||||
public class WsNotificationEvent
|
||||
{
|
||||
[JsonPropertyName("type")]
|
||||
public string? EventType { get; set; }
|
||||
public NotificationEventType? EventType { get; set; }
|
||||
|
||||
[JsonPropertyName("eventId")]
|
||||
public string? EventIdentifier { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,4 +2,9 @@ namespace Core.Models.Eft.Ws;
|
||||
|
||||
public class WsPing : WsNotificationEvent
|
||||
{
|
||||
}
|
||||
public WsPing()
|
||||
{
|
||||
EventType = NotificationEventType.ping;
|
||||
EventIdentifier = "ping";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
using Core.Models.Logging;
|
||||
|
||||
namespace Core.Models.Utils;
|
||||
|
||||
public interface ILogger
|
||||
{
|
||||
// TODO: Removing these 4 methods for now, revisit in the future
|
||||
// void WriteToLogFile(string data);
|
||||
// void Log(string data, LogTextColor? color, string? backgroundColor = null);
|
||||
void LogWithColor(string data, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null);
|
||||
void Success(string data);
|
||||
void Error(string data);
|
||||
void Warning(string data);
|
||||
void Info(string data);
|
||||
void Debug(string data);
|
||||
void Critical(string data);
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
using Core.Models.Logging;
|
||||
|
||||
namespace Core.Models.Utils;
|
||||
|
||||
public interface ISptLogger<T>
|
||||
{
|
||||
// TODO: Removing these 4 methods for now, revisit in the future
|
||||
// void WriteToLogFile(string data);
|
||||
// void Log(string data, LogTextColor? color, string? backgroundColor = null);
|
||||
void LogWithColor(string data, Exception? ex = null, LogTextColor? textColor = null, LogBackgroundColor? backgroundColor = null);
|
||||
void Success(string data, Exception? ex = null);
|
||||
void Error(string data, Exception? ex = null);
|
||||
void Warning(string data, Exception? ex = null);
|
||||
void Info(string data, Exception? ex = null);
|
||||
void Debug(string data, Exception? ex = null);
|
||||
void Critical(string data, Exception? ex = null);
|
||||
}
|
||||
Reference in New Issue
Block a user