Exemplo n.º 1
0
 public static string ToStringWithoutNewline(System.IO.StringWriter wr) {
   Contract.Requires(wr != null);
   var sb = wr.GetStringBuilder();
   var len = sb.Length;
   while (len > 0 && (sb[len - 1] == '\n' || sb[len - 1] == '\r')) {
     len--;
   }
   return sb.ToString(0, len);
 }
Exemplo n.º 2
0
 public bool AddLog(TestNode testNode, System.IO.StringWriter strWr)
 {
     string log = strWr.GetStringBuilder().ToString();
     if (log.Length > 0)
     {
         testNode.log += log;
         strWr.GetStringBuilder().Remove(0, log.Length);
         return true;
     }
     return false;
 }