SHA256
GuestLog - Moved Enums
- Enums moved to Enum folder (by type). - ResultCode class changed to enum to ensure type safety in results.
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
using Microsoft.Extensions.Localization;
|
||||
using MudBlazor;
|
||||
using Somnia.GuestLog.Models;
|
||||
using Somnia.GuestLog.Enums.Services;
|
||||
using Somnia.GuestLog.Enums.UI;
|
||||
using Somnia.GuestLog.Models.DTOs;
|
||||
using Somnia.GuestLog.Resources;
|
||||
using MessageKind = Somnia.GuestLog.Services.IUserMessageService.MessageKind;
|
||||
|
||||
namespace Somnia.GuestLog.Services;
|
||||
|
||||
@@ -59,9 +59,9 @@ public class UserMessageService(
|
||||
snackbar.Add(message: msg, severity: GetSnackbarSeveryForMessageKind(kind));
|
||||
}
|
||||
|
||||
private string GetMsgForResultCode(string resultCode)
|
||||
private string GetMsgForResultCode(ResultCode resultCode)
|
||||
{
|
||||
return _localizer[$"resultCode.{resultCode}"];
|
||||
return _localizer[$"resultCode.{Enum.GetName(resultCode)}"];
|
||||
}
|
||||
|
||||
private static string GetFormatedMessage(string template, params object[]? parameters)
|
||||
|
||||
Reference in New Issue
Block a user