/// <summary> /// Returns the translated string for the specified <see cref="CultureInfo"/>, using the passed <see cref="CultureInfo"/>. /// If no <see cref="CultureInfo.CurrentCulture"/> is passed, the <see cref="CultureInfo"/> is used. /// </summary> /// <param name="code">The <see cref="TranslationCode"/>.</param> /// <param name="cultureInfo">The <see cref="TranslationCode"/> (optional).</param> /// <returns>The translated text.</returns> public static string GetTranslation(this TranslationCode code, CultureInfo cultureInfo = null) { cultureInfo ??= CultureInfo.CurrentCulture; return(Exceptions.ResourceManager .GetString(code.ToString(), cultureInfo)); }
public SandoException(TranslationCode translationCode, Exception innerException) : base(Translator.GetTranslation(translationCode), innerException) { }
public SandoException(TranslationCode translationCode, Exception innerException, object[] exceptionMessageFormatArgs) : base(String.Format(Translator.GetTranslation(translationCode), exceptionMessageFormatArgs), innerException) { }
public ParserException(TranslationCode translationCode, String exceptionMessageFormatArg) : base(translationCode, null, exceptionMessageFormatArg) { }
public static string GetTranslation(TranslationCode translationCode) { return Translations.ResourceManager.GetString(translationCode.ToString()); }
public IndexerException(TranslationCode translationCode, Exception innerException) : base(translationCode, innerException) { }
public IndexerException(TranslationCode translationCode, Exception innerException, object[] exceptionMessageFormatArgs) : base(translationCode, innerException, exceptionMessageFormatArgs) { }
public ParserException(TranslationCode translationCode, String exceptionMessageFormatArg) : base(translationCode, null, exceptionMessageFormatArg) { }
public IndexerException(TranslationCode translationCode, Exception innerException, object[] exceptionMessageFormatArgs) : base(translationCode, innerException, exceptionMessageFormatArgs) { }
public IndexerException(TranslationCode translationCode, Exception innerException) : base(translationCode, innerException) { }
public static string GetTranslation(TranslationCode translationCode) { return(Translations.ResourceManager.GetString(translationCode.ToString())); }