public static string GetMessage(ErrorIdentity identity, string defaultMessage) { string result = defaultMessage; if (Messages.ContainsKey(identity)) { result = Messages[identity]; } return(result); }
public static string GetMessage(ErrorIdentity identity, params object[] args) { string result; if (Messages.ContainsKey(identity)) { result = string.Format(Messages[identity], args); } else { result = $"Unknow error identintity [{identity}]"; } return(result); }
public static string GetMessage(ErrorIdentity identity) { string defaultMessage = $"Error [{(int)identity}]: {identity}"; return(GetMessage(identity, defaultMessage)); }