PageRenderTime 12ms CodeModel.GetById 9ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/AvalonEdit/ICSharpCode.AvalonEdit/Xml/AbstractAXmlVisitor.cs

http://github.com/icsharpcode/ILSpy
C# | 44 lines | 26 code | 8 blank | 10 comment | 0 complexity | 2ce4b79fb64d3fa89670ff8d5b03208e MD5 | raw file
 1// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
 2// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
 3
 4using System;
 5using System.Text;
 6
 7namespace ICSharpCode.AvalonEdit.Xml
 8{
 9	/// <summary>
10	/// Derive from this class to create visitor for the XML tree
11	/// </summary>
12	public abstract class AbstractAXmlVisitor : IAXmlVisitor
13	{
14		/// <summary> Visit RawDocument </summary>
15		public virtual void VisitDocument(AXmlDocument document)
16		{
17			foreach(AXmlObject child in document.Children) child.AcceptVisitor(this);
18		}
19		
20		/// <summary> Visit RawElement </summary>
21		public virtual void VisitElement(AXmlElement element)
22		{
23			foreach(AXmlObject child in element.Children) child.AcceptVisitor(this);
24		}
25		
26		/// <summary> Visit RawTag </summary>
27		public virtual void VisitTag(AXmlTag tag)
28		{
29			foreach(AXmlObject child in tag.Children) child.AcceptVisitor(this);
30		}
31		
32		/// <summary> Visit RawAttribute </summary>
33		public virtual void VisitAttribute(AXmlAttribute attribute)
34		{
35			
36		}
37		
38		/// <summary> Visit RawText </summary>
39		public virtual void VisitText(AXmlText text)
40		{
41			
42		}
43	}
44}