Ejemplo n.º 1
0
        public override bool Match(XsltDebuggerContext ctx)
        {
            XPathNavigator last_node = ctx.Session.CustomCache [CustomCacheId] as XPathNavigator;

            XmlNodeWriter w = ctx.Session.Output as XmlNodeWriter;
            XmlNode       n = w != null ? w.Document : null;

            if (n == null)
            {
                return(false);                // it is not ready for debugging.
            }
            if (exp == null)
            {
                exp = n.CreateNavigator().Compile(xpath);
            }

            exp.SetContext(ctx.Session.Debugger.NamespaceManager);
            XPathNodeIterator i = w.Current.CreateNavigator().Select(exp);
            bool next           = last_node == null;

            while (i.MoveNext())
            {
                if (next)
                {
                    ctx.Session.CustomCache [CustomCacheId] = i.Current;
                    return(true);
                }
                else if (i.Current.IsSamePosition(last_node))
                {
                    next = true;
                }
            }
            return(false);
        }
Ejemplo n.º 2
0
        bool Break(XsltDebuggerContext ctx)
        {
            // FIXME: support StepIn,StepNext,StepOut etc.

            foreach (XsltDebuggerBreakpoint bp in breakpoints)
            {
                if (bp.Match(ctx))
                {
                    return(true);
                }
            }
            return(false);
        }
Ejemplo n.º 3
0
		public override bool Match (XsltDebuggerContext ctx)
		{
			XPathNavigator s = ctx.StylesheetElement;
			IXmlLineInfo li = s as IXmlLineInfo;
			if (style != null)
				return s.IsSamePosition (style);
			if (li == null)
				return false;
			else if (base_uri != null && base_uri != s.BaseURI ||
				 line != li.LineNumber ||
				 column != 0 && column != li.LinePosition)
				return false;
			style = s;
			return true;
		}
Ejemplo n.º 4
0
        public override bool Match(XsltDebuggerContext ctx)
        {
            XPathNavigator s  = ctx.StylesheetElement;
            IXmlLineInfo   li = s as IXmlLineInfo;

            if (style != null)
            {
                return(s.IsSamePosition(style));
            }
            if (li == null)
            {
                return(false);
            }
            else if (base_uri != null && base_uri != s.BaseURI ||
                     line != li.LineNumber ||
                     column != 0 && column != li.LinePosition)
            {
                return(false);
            }
            style = s;
            return(true);
        }
Ejemplo n.º 5
0
		public abstract bool Match (XsltDebuggerContext ctx);
Ejemplo n.º 6
0
		public override bool Match (XsltDebuggerContext ctx)
		{
			XPathNavigator last_node = ctx.Session.CustomCache [CustomCacheId] as XPathNavigator;

			XmlNodeWriter w = ctx.Session.Output as XmlNodeWriter;
			XmlNode n = w != null ? w.Document : null;
			if (n == null)
				return false; // it is not ready for debugging.

			if (exp == null)
				exp = n.CreateNavigator ().Compile (xpath);

			exp.SetContext (ctx.Session.Debugger.NamespaceManager);
			XPathNodeIterator i = w.Current.CreateNavigator ().Select (exp);
			bool next = last_node == null;
			while (i.MoveNext ()) {
				if (next) {
					ctx.Session.CustomCache [CustomCacheId] = i.Current;
					return true;
				} else if (i.Current.IsSamePosition (last_node))
					next = true;
			}
			return false;
		}
Ejemplo n.º 7
0
 public abstract bool Match(XsltDebuggerContext ctx);
Ejemplo n.º 8
0
		public XsltExecuteEventArgs (XsltDebuggerContext ctx)
		{
			this.ctx = ctx;
		}
Ejemplo n.º 9
0
 public XsltExecuteEventArgs(XsltDebuggerContext ctx)
 {
     this.ctx = ctx;
 }
Ejemplo n.º 10
0
		bool Break (XsltDebuggerContext ctx)
		{
			// FIXME: support StepIn,StepNext,StepOut etc.

			foreach (XsltDebuggerBreakpoint bp in breakpoints)
				if (bp.Match (ctx))
					return true;
			return false;
		}