コード例 #1
0
 public RandomNameSequence(int givenNameLength)
 {
     using (var storageProvider = new AllCheckinSqlStorageProvider())
     {
         givenNames = storageProvider.GetGivenNames(givenNameLength);
         surNames   = storageProvider.GetSurNames();
     }
 }
コード例 #2
0
ファイル: CoreTest.cs プロジェクト: cfvbaibai/AllCheckins
 public void TestGetSurNames()
 {
     using (var storageProvider = new AllCheckinSqlStorageProvider())
     {
         var surNames    = storageProvider.GetSurNames();
         var totalWeight = surNames.Sum(surName => surName.Weight);
         Console.WriteLine("Total Weight: {0}", totalWeight);
         Console.WriteLine("Max Int: {0}", Int32.MaxValue);
         Console.WriteLine("================================");
         foreach (var surName in surNames)
         {
             Console.WriteLine("{0,-16}, {1,-16}, {2}", surName.Id, surName.Chinese, surName.Weight);
         }
     }
 }