This class contains strings corresponding to Ldap Result Codes. The resources are accessed by the String representation of the result code.
Inheritance: System.Resources.ResourceManager
        /// <summary>
        ///     Returns a string representing the Ldap result code.  The message
        ///     is obtained from the locale specific ResultCodeMessage resource.
        /// </summary>
        /// <param name="code">
        ///     the result code.
        /// </param>
        /// <param name="locale">
        ///     The Locale that should be used to pull message
        ///     strings out of ResultMessages.
        /// </param>
        /// <returns>
        ///     the String representing the result code.
        /// </returns>
        public static string GetResultString(int code, CultureInfo locale)
        {
            var codeAsString = Convert.ToString(code);

            return(ResultCodeMessages.HasResultCode(codeAsString)
                ? ResultCodeMessages.GetResultCode(codeAsString)
                : GetMessage(ExceptionMessages.UnknownResult, new object[] { code }, locale));
        }
        /// <summary>
        ///     Returns a string representing the Ldap result code.  The message
        ///     is obtained from the locale specific ResultCodeMessage resource.
        /// </summary>
        /// <param name="code">
        ///     the result code
        /// </param>
        /// <param name="locale">
        ///     The Locale that should be used to pull message
        ///     strings out of ResultMessages.
        /// </param>
        /// <returns>
        ///     the String representing the result code.
        /// </returns>
        public static string getResultString(int code, CultureInfo locale)
        {
            string result;

            try
            {
                result = ResultCodeMessages.GetResultCode(Convert.ToString(code));
            }
            catch (ArgumentNullException)
            {
                result = getMessage(ExceptionMessages.UNKNOWN_RESULT, new object[] { code }, locale);
            }
            return(result);
        }
Beispiel #3
0
 /// <summary>
 ///     Returns a string representing the Ldap result code.  The message
 ///     is obtained from the locale specific ResultCodeMessage resource.
 /// </summary>
 /// <param name="code">
 ///     the result code
 /// </param>
 /// <param name="locale">
 ///     The Locale that should be used to pull message
 ///     strings out of ResultMessages.
 /// </param>
 /// <returns>
 ///     the String representing the result code.
 /// </returns>
 public static string getResultString(int code, CultureInfo locale)
 {
     return(ResultCodeMessages.GetResultCode(Convert.ToString(code)) ?? getMessage(ExceptionMessages.UNKNOWN_RESULT, new object[] { code }, locale));
 }