예제 #1
0
        public static string GetMessage(ErrorIdentity identity, string defaultMessage)
        {
            string result = defaultMessage;

            if (Messages.ContainsKey(identity))
            {
                result = Messages[identity];
            }
            return(result);
        }
예제 #2
0
        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);
        }
예제 #3
0
        public static string GetMessage(ErrorIdentity identity)
        {
            string defaultMessage = $"Error [{(int)identity}]: {identity}";

            return(GetMessage(identity, defaultMessage));
        }