/// <summary> /// deals with the "bot" tag /// </summary> /// <param name="thisNode">the "bot" node in question</param> /// <param name="thisCat">the current category</param> /// <param name="myBot">the bot whose graphmaster returned the "template"</param> /// <param name="sUserID">the user who requires a reply</param> /// <returns>the string that results in the processing of this node</returns> private static string bot(XmlNode thisNode, cCategory thisCat, cBot myBot, string sUserID) { // get the attributes for this tag XmlAttributeCollection myAttributes = thisNode.Attributes; // no attributes? then just return a blank if (myAttributes.Count == 0) { return(""); } // o.k. we have an attribute to process // get the value associated with the "name" attribute string sName = thisNode.Attributes["name"].Value; return((string)myBot.getPredicate(sName)); }
/// <summary> /// deals with the "bot" tag /// </summary> /// <param name="thisNode">the "bot" node in question</param> /// <param name="thisCat">the current category</param> /// <param name="myBot">the bot whose graphmaster returned the "template"</param> /// <param name="sUserID">the user who requires a reply</param> /// <returns>the string that results in the processing of this node</returns> private static string bot(XmlNode thisNode, cCategory thisCat, cBot myBot, string sUserID) { // get the attributes for this tag XmlAttributeCollection myAttributes = thisNode.Attributes; // no attributes? then just return a blank if (myAttributes.Count==0) { return ""; } // o.k. we have an attribute to process // get the value associated with the "name" attribute string sName=thisNode.Attributes["name"].Value; return (string)myBot.getPredicate(sName); }