コード例 #1
0
 private void AssertAcceptableResultForExistentWord(WordFindingResult result)
 {
     Assert.IsTrue(result.WordIndex > 0);
     #if DEBUG
     LogToAppFolderFile(result);
     #endif
 }
コード例 #2
0
 private void LogToAppFolderFile(WordFindingResult result)
 {
     try
     {
         File.AppendAllLines(@"catsKilled.log", new[] { string.Format("At [{0}] you killed [{1}] cats to find the word [{2}], or simply to get the [{3}] error code.", DateTime.Now.ToShortTimeString(), result.WebservicesCallCount, result.WordFound, result.ErrorCode) });
     }
     catch (Exception) { }
 }
コード例 #3
0
 private static string MessageFor(WordFindingResult result, string wordToFind)
 {
     if (result.WordIndex > 0)
     {
         return(string.Format(Messages.WORD_FOUND, result.WebservicesCallCount, result.WordFound, result.WordIndex));
     }
     return(string.Format(Messages.WORD_NOT_FOUND, result.WebservicesCallCount, wordToFind, result.ErrorCode));
 }