How to count number of lines that starts with...

  • Автор темы Автор темы Alouka
  • Дата начала Дата начала

Alouka

Пользователь
Регистрация
30.07.2015
Сообщения
89
Реакции
5
Баллы
8
Hello,

I have a log csv file that i want count number of lines that the two first columns value ar A B for exemple.
 
I know, but i wonder if there is a manner to really count success times in log file etc...
 
But is there any way to make a project run the number of success required ? at the end of each template, it counts success lines in log file, then decide if achieved or not yet... ?
 
But is there any way to make a project run the number of success required ? at the end of each template, it counts success lines in log file, then decide if achieved or not yet... ?
If you want to count project execution successes, use the following C# snippet:
Код:
Развернуть Свернуть Копировать
var name = "Project name";
var tasks = ZennoPoster.TasksList;
foreach(var task in tasks)
{
    var doc = new System.Xml.XmlDocument();
    doc.LoadXml("<Task>" + task + "</Task>");
    var nameNode = doc.SelectSingleNode("Task/Name");
    if(nameNode != null && nameNode.InnerText.Equals(name))
    {
        return doc.SelectSingleNode("Task/ExecutionSettings/DoneSuccesfully").InnerText;
    }
}
Then compare result with required number of successes and decide whether it's achieved or not.
 
Super ! Thank you :)
 
  • Спасибо
Реакции: VladZen
But how to count the number of successes.. i didn't understand it well
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)