Пример #1
0
 public void WriteTag(string tagName, bool closeToo, string elementText,  LogAttribute[] data) {
     Console.WriteLine(tagName);
     if (data != null) {
         foreach (LogAttribute a in data) {
             Console.WriteLine(" " + a.Name + ": " + a.Value);
         }
     }
     Console.WriteLine("  " + elementText);
 }
Пример #2
0
 public void WriteTag(string tagName, bool closeToo, LogAttribute data)
 {
     if (data == null)
     {
         WriteTag(tagName, closeToo, null, null);
     }
     else
     {
         WriteTag(tagName, closeToo, null, new LogAttribute[] { data });
     }
 }
        internal LogAttribute[] GetResultLogAttributes()
        {
            LogAttribute type = new LogAttribute("type", _type ? "Pass" : "Fail");

            if (TotalCount == 0)
            {
                return new LogAttribute[] { type }
            }
            ;
            else
            {
                return(new LogAttribute[] {
                    type,
                    new LogAttribute("total", TotalCount.ToString()),
                    new LogAttribute("fail", FailCount.ToString())
                });
            }
        }
Пример #4
0
 public void WriteTag(string tagName, bool closeToo,  LogAttribute[] data) {
     WriteTag(tagName, closeToo, null, data);
 }
Пример #5
0
 public void WriteTag(string tagName, bool closeToo, LogAttribute data) {
     if ( data == null )
         WriteTag(tagName, closeToo, null, null);
     else
         WriteTag(tagName, closeToo, null, new LogAttribute[] { data });
 }
Пример #6
0
 internal LogAttribute[] GetResultLogAttributes() {
     LogAttribute type = new LogAttribute("type", _type ? "Pass" : "Fail");
     if ( TotalCount == 0 )
         return new LogAttribute[] { type };
     else {
         return new LogAttribute[] {
             type,
             new LogAttribute("total", TotalCount.ToString()),
             new LogAttribute("fail", FailCount.ToString())
         };
     }
 }