/// <summary> /// Called after end tag is read /// </summary> public void OnElementEnd(EndElementContext context) { if (openedElements.Count > 0 && openedElements.Peek().ElementName == context.ElementName && openedElements.Peek().Prefix == context.Prefix) { openedElements.Pop(); } }
public void OnElementEnd(EndElementContext context) { bool matched = false; if (index == 6) { matched = true; Assert.IsFalse(context.WithinClientSideComment); Assert.IsTrue(string.IsNullOrEmpty(context.Prefix)); Assert.AreEqual("title", context.ElementName); } if (index == 7) { matched = true; Assert.IsFalse(context.WithinClientSideComment); Assert.IsTrue(string.IsNullOrEmpty(context.Prefix)); Assert.AreEqual("head", context.ElementName); } if (index == 10) { matched = true; Assert.AreEqual("asp", context.Prefix); Assert.IsFalse(context.WithinClientSideComment); Assert.AreEqual("LinqDataSource", context.ElementName); } if (index == 29) { matched = true; Assert.IsFalse(context.WithinClientSideComment); Assert.IsTrue(string.IsNullOrEmpty(context.Prefix)); Assert.AreEqual("EditItemTemplate", context.ElementName); } if (index == 30) { matched = true; Assert.AreEqual("asp", context.Prefix); Assert.IsFalse(context.WithinClientSideComment); Assert.AreEqual("FormView", context.ElementName); } if (index == 40) { matched = true; Assert.IsFalse(context.WithinClientSideComment); Assert.IsTrue(string.IsNullOrEmpty(context.Prefix)); Assert.AreEqual("body", context.ElementName); } if (index == 41) { matched = true; Assert.IsFalse(context.WithinClientSideComment); Assert.IsTrue(string.IsNullOrEmpty(context.Prefix)); Assert.AreEqual("html", context.ElementName); } if (index == 28) { matched = true; Assert.IsTrue(context.WithinClientSideComment); Assert.AreEqual("asp", context.Prefix); Assert.AreEqual("TextBox", context.ElementName); } Assert.IsTrue(matched); index++; }