Ejemplo n.º 1
0
        /// <summary>
        /// Creates a glimpse-extra instruction and parses its content.
        /// </summary>
        /// <param name="xn">The XML repersentation of the instruction to be checked</param>
        /// <param name="con">The current context object</param>
        static GlimpseExtra CreateGlimpseExtra(XmlNode xn, Context con)
        {
            GlimpseExtra glimpse = new GlimpseExtra();

            glimpse.Path       = XmlFiler.getAttribute(xn, "path");
            glimpse.SelectPath = XmlFiler.getAttribute(xn, "select-path");
            glimpse.Names      = XmlFiler.getAttribute(xn, "names");
            glimpse.Select     = XmlFiler.getAttribute(xn, "select");
            glimpse.OnPass     = XmlFiler.getAttribute(xn, "on-pass");
            glimpse.OnFail     = XmlFiler.getAttribute(xn, "on-fail");
            string rest = XmlFiler.getAttribute(xn, "wait");

            if (rest != null)
            {
                glimpse.Rest = Convert.ToInt32(rest);
            }
            InterpretMessage(glimpse, xn.ChildNodes);
            AddInstruction(xn, glimpse, con);
            return(glimpse);
        }
Ejemplo n.º 2
0
		/// <summary>
		/// Creates a glimpse-extra instruction and parses its content.
		/// </summary>
		/// <param name="xn">The XML repersentation of the instruction to be checked</param>
		/// <param name="con">The current context object</param>
		static GlimpseExtra CreateGlimpseExtra(XmlNode xn, Context con)
		{
			GlimpseExtra glimpse = new GlimpseExtra();
			glimpse.Path = XmlFiler.getAttribute(xn, "path");
			glimpse.SelectPath = XmlFiler.getAttribute(xn, "select-path");
			glimpse.Names = XmlFiler.getAttribute(xn, "names");
			glimpse.Select = XmlFiler.getAttribute(xn, "select");
			glimpse.OnPass = XmlFiler.getAttribute(xn, "on-pass");
			glimpse.OnFail = XmlFiler.getAttribute(xn, "on-fail");
			string rest = XmlFiler.getAttribute(xn, "wait");
			if (rest != null) glimpse.Rest = Convert.ToInt32(rest);
			InterpretMessage(glimpse,xn.ChildNodes);
			AddInstruction(xn, glimpse, con);
			return glimpse;
		}