コード例 #1
0
 private static void Run(IEnumerable <int> enumerable)
 {
     //TranslateService ts = new TranslateService();
     foreach (var item in enumerable.OrderBy(n => n))
     {
         Console.WriteLine("{0} {1}", item, TranslateFactory.Create(item).Translate());
     }
     Console.WriteLine();
 }
コード例 #2
0
        public string ConvertSecondGroupToString()
        {
            string result = string.Empty;

            if (this.LastNumber != 0)
            {
                string value = numberList.TryGetValue(this.LastNumber, out value) ? value : TranslateFactory.Create(this.LastNumber).Translate();

                result = string.Format("and {0}", value);
            }
            return(result);
        }