public override void VisitTag(AXmlTag tag)
 {
     if (textSource.GetText(tag.StartOffset, tag.OpeningBracket.Length) != tag.OpeningBracket)
         throw new InvalidOperationException();
     if (textSource.GetText(tag.NameSegment) != tag.Name)
         throw new InvalidOperationException();
     if (textSource.GetText(tag.EndOffset - tag.ClosingBracket.Length, tag.ClosingBracket.Length) != tag.ClosingBracket)
         throw new InvalidOperationException();
     base.VisitTag(tag);
 }
		ResolveResult ResolveTag(AXmlTag tag, CancellationToken cancellationToken)
		{
			if (!tag.IsStartOrEmptyTag && !tag.IsEndTag)
				return ErrorResolveResult.UnknownError;
			return ResolveElement(tag.Ancestors.OfType<AXmlElement>().First(), cancellationToken);
		}
示例#3
0
		/// <summary> Visit AXmlTag </summary>
		public virtual void VisitTag(AXmlTag tag)
		{
			foreach (AXmlObject child in tag.Children)
				child.AcceptVisitor(this);
		}