public string[] TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = toneType; format.VCharType = vcharType; format.CaseType = caseType; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format)); }
public string[] TestCharWithMultiplePronunciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { var format = new HanyuPinyinOutputFormat { ToneType = toneType, VCharType = vcharType, CaseType = caseType }; return(PinyinHelper.ToHanyuPinyinStringArray(ch, format)); }
public void TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType, string[] result) { var format = new HanyuPinyinOutputFormat { ToneType = toneType, VCharType = vcharType, CaseType = caseType }; Assert.True(Enumerable.SequenceEqual(result, PinyinHelper.ToHanyuPinyinStringArray(ch, format))); }
/// <summary> /// Restore default variable values for this class /// 重新加载本类的默认变量值 /// /// Default values are listed below: /// 默认变量值如下 /// <p> /// HanyuPinyinVCharType := WITH_U_AND_COLON <br /> /// HanyuPinyinCaseType := LOWERCASE <br/> /// HanyuPinyinToneType := WITH_TONE_NUMBER <br/> /// </p> /// </summary> public void RestoreDefault() { vCharType = HanyuPinyinVCharType.WITH_U_AND_COLON; caseType = HanyuPinyinCaseType.LOWERCASE; toneType = HanyuPinyinToneType.WITH_TONE_NUMBER; }
/** * Define the output format of Chinese tones * * @param toneType * the output format of Chinese tones * * @see HanyuPinyinToneType */ public void setToneType(HanyuPinyinToneType toneType) { this.toneType = toneType; }
/** * Restore default variable values for this class * * Default values are listed below: * * <p> * HanyuPinyinVCharType := WITH_U_AND_COLON <br> * HanyuPinyinCaseType := LOWERCASE <br> * HanyuPinyinToneType := WITH_TONE_NUMBER <br> */ public void restoreDefault() { vCharType = HanyuPinyinVCharType.WITH_U_AND_COLON; caseType = HanyuPinyinCaseType.LOWERCASE; toneType = HanyuPinyinToneType.WITH_TONE_NUMBER; }
public string[] TestCharWithMultiplePronouciations( char ch, HanyuPinyinToneType toneType, HanyuPinyinVCharType vcharType, HanyuPinyinCaseType caseType) { HanyuPinyinOutputFormat format = new HanyuPinyinOutputFormat(); format.ToneType = toneType; format.VCharType = vcharType; format.CaseType = caseType; return PinyinHelper.ToHanyuPinyinStringArray(ch, format); }