| ZennoLab.CommandCenter Assembly > ZennoLab.CommandCenter Namespace > ZennoPoster Class > ClearSuccess Method : ClearSuccess(Guid) Method |
Type: System.Guid
Id of task.
// 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 id var xpath = "Task/Id"; // Gets guid string from task data var doc = new System.Xml.XmlDocument(); doc.LoadXml("<Task>" + source + "</Task>"); string result; var node = doc.SelectSingleNode(xpath); if (node != null) result = node.InnerXml; else throw new InvalidDataException(string.Format("{0} is null", xpath)); Guid id; // Parse guid if (Guid.TryParse(result, out id)) // If ok, clear success of the task ZennoPoster.ClearSuccess(id); else throw new FormatException(string.Format("{0} is not guid", result)); }
// 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 id $xpath = "Task/Id"; // Gets guid string from task data $doc = new System\Xml\XmlDocument(); $doc->LoadXml("<Task>" + $source + "</Task>"); $result; $node = $doc->SelectSingleNode($xpath); if ($node != null) $result = $node->InnerXml; else throw new InvalidDataException(String::Format("{0} is null", $xpath)); $id = ""; // Parse guid if (Guid::TryParse($result, $id)) // If ok, clear success of the task ZennoPoster::ClearSuccess($id); else throw new FormatException(String::Format("{0} is not guid", $result)); }
Target Platforms: Desktop: Windows XP SP3 and older. Server: Windows Server 2003 and older.