private IConverter CreateKanjiConverter(CharacterSet characterSet) { if (characterSet.Equals(CharacterSet.ASCII)) { return(new CompoundConverter(CreateKanjiConverter(CharacterSet.HIRAGANA), CreateHiraganaConverter(CharacterSet.ASCII))); } else if (characterSet.Equals(CharacterSet.KANJI)) { return(new DelegateConverter(kanjiConverterImpl.ToKanji)); } else if (characterSet.Equals(CharacterSet.HIRAGANA)) { return(new DelegateConverter(kanjiConverterImpl.ToHiragana)); } else if (characterSet.Equals(CharacterSet.KATAKANA)) { return(new CompoundConverter(CreateKanjiConverter(CharacterSet.HIRAGANA), CreateHiraganaConverter(CharacterSet.KATAKANA))); } else if (characterSet.Equals(CharacterSet.HALFKANA)) { return(new CompoundConverter(CreateKanjiConverter(CharacterSet.HIRAGANA), CreateHiraganaConverter(CharacterSet.HALFKANA))); } else { return(null); } }
private IConverter CreateKatakanaConverter(CharacterSet characterSet) { if (characterSet.Equals(CharacterSet.ASCII)) { return(new DelegateConverter(kanaToRomanConverterImpl.ConvertKatakana)); } else if (characterSet.Equals(CharacterSet.HIRAGANA)) { return(new DelegateConverter(katakanaConverterImpl.ToHiragana)); } else if (characterSet.Equals(CharacterSet.KATAKANA)) { return(new DelegateConverter(katakanaConverterImpl.ToKatakana)); } else { return(null); } }