| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > ZennoPoster Class > ClearSuccess Method : ClearSuccess(String) Method |
Type: System.String
Name of task. Finds the first occurrence.
Type: System.String
Name of task. Finds the first occurrence.
// Gets list of tasks var tasksList = new List<string>(ZennoPoster.TasksList); // Check the presence of items in the list if(tasksList.Count != 0) { // Select ane item var source = tasksList[0]; // Sets path to task name var xpath = "Task/Name"; // Gets guid string from task data var doc = new System.Xml.XmlDocument(); doc.LoadXml("<Task>" + source + "</Task>"); string name; var node = doc.SelectSingleNode(xpath); if (node != null) name = node.InnerXml; else throw new InvalidDataException(string.Format("{0} is null", xpath)); if(!String.IsNullOrEmpty(name)) // If ok, clears success for first task with this name ZennoPoster.ClearSuccess(name); else throw new FormatException("Name is empty"); }
// Gets list of tasks $tasksList = new List<string>(ZennoPoster::TasksList); // Check the presence of items in the list if(tasksList->Count != 0) { // Select ane item $source = $tasksList[0]; // Sets path to task name $xpath = "Task/Name"; // Gets guid string from task data $doc = new System\Xml\XmlDocument(); $doc->LoadXml("<Task>" + $source + "</Task>"); $name; $node = $doc->SelectSingleNode($xpath); if ($node != null) $name = $node->InnerXml; else throw new InvalidDataException(String::Format("{0} is null", $xpath)); if (String::IsNullOrEmpty($name)) // If ok, clears success for first task with this name ZennoPoster::ClearSuccess($name); else throw new FormatException("Name is empty"); }
Target Platforms: Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family, Windows Seven