public static string GetAlternationText(AlternationTextType type, int index) { if (index < 1 || index > 9) { throw new ArgumentOutOfRangeException(nameof(index)); } return(AlternationTexts[type][index - 1]); }
public static bool TryParse(string text, out int index, out AlternationTextType type) { if (!AlternationTextIndices.TryGetValue(text, out index)) { type = AlternationTextType.Arabic; return(false); } type = AlternationTextTypes[text]; return(true); }