<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=Generic_object_visitor_pattern</id>
	<title>Generic object visitor pattern - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.catglobe.com/index.php?action=history&amp;feed=atom&amp;title=Generic_object_visitor_pattern"/>
	<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;action=history"/>
	<updated>2026-04-29T23:46:06Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=24714&amp;oldid=prev</id>
		<title>Wikicatglobe at 02:05, 18 October 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=24714&amp;oldid=prev"/>
		<updated>2013-10-18T02:05:55Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 02:05, 18 October 2013&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;accesscontrol&amp;gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Administrators,,Cem,,Maysunshine&lt;/del&gt;&amp;lt;/accesscontrol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;accesscontrol&amp;gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Main:MyGroup&lt;/ins&gt;&amp;lt;/accesscontrol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Miscellaneous]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:Miscellaneous]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-19642:rev-24714:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Wikicatglobe</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=19642&amp;oldid=prev</id>
		<title>Cg_pham at 09:52, 24 October 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=19642&amp;oldid=prev"/>
		<updated>2011-10-24T09:52:39Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 09:52, 24 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;accesscontrol&amp;gt;Administrators,,Cem,,Maysunshine&amp;lt;/accesscontrol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;accesscontrol&amp;gt;Administrators,,Cem,,Maysunshine&amp;lt;/accesscontrol&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Guidelines&lt;/del&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Miscellaneous&lt;/ins&gt;]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[New Report Design - 2009]] =&amp;gt; [[Generic object visitor pattern]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[New Report Design - 2009]] =&amp;gt; [[Generic object visitor pattern]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-19516:rev-19642:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Cg_pham</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=19516&amp;oldid=prev</id>
		<title>Cg_pham at 07:31, 5 October 2011</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=19516&amp;oldid=prev"/>
		<updated>2011-10-05T07:31:51Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:31, 5 October 2011&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;accesscontrol&amp;gt;Administrators,,Cem,,Maysunshine&amp;lt;/accesscontrol&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Guidelines]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[New Report Design - 2009]] =&amp;gt; [[Generic object visitor pattern]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[New Report Design - 2009]] =&amp;gt; [[Generic object visitor pattern]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7764:rev-19516:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Cg_pham</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7764&amp;oldid=prev</id>
		<title>Catglobe: /* How to implement VisitMethodImpl? */</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7764&amp;oldid=prev"/>
		<updated>2009-09-21T07:48:27Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;How to implement VisitMethodImpl?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:48, 21 September 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to implement &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;? ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to implement &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;? ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[Table &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;chart builder&lt;/del&gt;]] for a complete implementation of &#039;&#039;VisitMethodImpl&#039;&#039;. But merely said, the implementation of &#039;&#039;VisitMethodImpl&#039;&#039; &#039;&#039;&#039;MUST&#039;&#039;&#039;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Tabulation Script for setting inline style to &lt;/ins&gt;Table &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Chart&lt;/ins&gt;]] for a complete implementation of &#039;&#039;VisitMethodImpl&#039;&#039;. But merely said, the implementation of &#039;&#039;VisitMethodImpl&#039;&#039; &#039;&#039;&#039;MUST&#039;&#039;&#039;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Provide a type that inherits from &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; or can use the &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; itself&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Provide a type that inherits from &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; or can use the &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; itself&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create private method that conform to type &amp;#039;&amp;#039;Action&amp;lt;T, VisitContext&amp;gt;&amp;#039;&amp;#039; where &amp;#039;&amp;#039;T&amp;#039;&amp;#039; is the accepted type&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create private method that conform to type &amp;#039;&amp;#039;Action&amp;lt;T, VisitContext&amp;gt;&amp;#039;&amp;#039; where &amp;#039;&amp;#039;T&amp;#039;&amp;#039; is the accepted type&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7763:rev-7764:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Catglobe</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7763&amp;oldid=prev</id>
		<title>Catglobe: /* How to implement VisitMethodImpl? */</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7763&amp;oldid=prev"/>
		<updated>2009-09-21T07:47:36Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;How to implement VisitMethodImpl?&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:47, 21 September 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l36&quot;&gt;Line 36:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 36:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to implement &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;? ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== How to implement &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;? ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;TableChart style applier&lt;/del&gt;]] for a complete implementation of &#039;&#039;VisitMethodImpl&#039;&#039;. But merely said, the implementation of &#039;&#039;VisitMethodImpl&#039;&#039; &#039;&#039;&#039;MUST&#039;&#039;&#039;:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;See [[&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Table chart builder&lt;/ins&gt;]] for a complete implementation of &#039;&#039;VisitMethodImpl&#039;&#039;. But merely said, the implementation of &#039;&#039;VisitMethodImpl&#039;&#039; &#039;&#039;&#039;MUST&#039;&#039;&#039;:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Provide a type that inherits from &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; or can use the &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; itself&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Provide a type that inherits from &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; or can use the &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; itself&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create private method that conform to type &amp;#039;&amp;#039;Action&amp;lt;T, VisitContext&amp;gt;&amp;#039;&amp;#039; where &amp;#039;&amp;#039;T&amp;#039;&amp;#039; is the accepted type&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;* Create private method that conform to type &amp;#039;&amp;#039;Action&amp;lt;T, VisitContext&amp;gt;&amp;#039;&amp;#039; where &amp;#039;&amp;#039;T&amp;#039;&amp;#039; is the accepted type&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7758:rev-7763:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Catglobe</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7758&amp;oldid=prev</id>
		<title>Catglobe at 07:34, 21 September 2009</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7758&amp;oldid=prev"/>
		<updated>2009-09-21T07:34:46Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:34, 21 September 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[New Report Design - 2009]] =&amp;gt; [[Generic object visitor pattern]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://en.wikipedia.org/wiki/Visitor_pattern Visitor pattern] is a common design pattern in programming world. It is usually used for object navigation. For example, in Xml serialization, we need to go through all properties of an object to serialize them into Xml. Properties of object require different treatment base on its type, and if it is an object then possibly the recursion would happen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://en.wikipedia.org/wiki/Visitor_pattern Visitor pattern] is a common design pattern in programming world. It is usually used for object navigation. For example, in Xml serialization, we need to go through all properties of an object to serialize them into Xml. Properties of object require different treatment base on its type, and if it is an object then possibly the recursion would happen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7757:rev-7758:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Catglobe</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7757&amp;oldid=prev</id>
		<title>Catglobe: /* Introduction */</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7757&amp;oldid=prev"/>
		<updated>2009-09-21T07:32:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Introduction&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 07:32, 21 September 2009&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l1&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;== Introduction ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://en.wikipedia.org/wiki/Visitor_pattern &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;| &lt;/del&gt;Visitor pattern] is a common design pattern in programming world. It is usually used for object navigation. For example, in Xml serialization, we need to go through all properties of an object to serialize them into Xml. Properties of object require different treatment base on its type, and if it is an object then possibly the recursion would happen.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[http://en.wikipedia.org/wiki/Visitor_pattern Visitor pattern] is a common design pattern in programming world. It is usually used for object navigation. For example, in Xml serialization, we need to go through all properties of an object to serialize them into Xml. Properties of object require different treatment base on its type, and if it is an object then possibly the recursion would happen.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sample implementation could be found in &amp;#039;&amp;#039;ReportLayout2006&amp;#039;&amp;#039;&amp;#039;s project, class name &amp;#039;&amp;#039;AspRomVisitor&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Sample implementation could be found in &amp;#039;&amp;#039;ReportLayout2006&amp;#039;&amp;#039;&amp;#039;s project, class name &amp;#039;&amp;#039;AspRomVisitor&amp;#039;&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki:diff:1.41:old-7756:rev-7757:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Catglobe</name></author>
	</entry>
	<entry>
		<id>https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7756&amp;oldid=prev</id>
		<title>Catglobe: First version</title>
		<link rel="alternate" type="text/html" href="https://wiki.catglobe.com/index.php?title=Generic_object_visitor_pattern&amp;diff=7756&amp;oldid=prev"/>
		<updated>2009-09-21T07:31:02Z</updated>

		<summary type="html">&lt;p&gt;First version&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;== Introduction ==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Visitor_pattern | Visitor pattern] is a common design pattern in programming world. It is usually used for object navigation. For example, in Xml serialization, we need to go through all properties of an object to serialize them into Xml. Properties of object require different treatment base on its type, and if it is an object then possibly the recursion would happen.&lt;br /&gt;
&lt;br /&gt;
Sample implementation could be found in &amp;#039;&amp;#039;ReportLayout2006&amp;#039;&amp;#039;&amp;#039;s project, class name &amp;#039;&amp;#039;AspRomVisitor&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
== Inspiration ==&lt;br /&gt;
The pattern is perfect for navigating objects, however there are cases that we cannot touch code of some class to implement the &amp;#039;&amp;#039;Accept&amp;#039;&amp;#039; method. More over, if there are hundreds of properties then it is not reasonable to implement the accept method on all classes just to call back to the visitor&amp;#039;s method. &lt;br /&gt;
&lt;br /&gt;
So, to overcome such a problem, I came to implementation of a custom visitor that utilize the power of reflection and dynamic delegate.&lt;br /&gt;
&lt;br /&gt;
== Design Decisions ==&lt;br /&gt;
* Visit only instance public properties&lt;br /&gt;
* Object inspection at runtime must be cached&lt;br /&gt;
&lt;br /&gt;
== Design Details ==&lt;br /&gt;
[[Image: ObjectVisitor.gif]]&lt;br /&gt;
&lt;br /&gt;
The implementation is rather simple, the entry point for the whole design is method &amp;#039;&amp;#039;Visit&amp;#039;&amp;#039; of &amp;#039;&amp;#039;Visitor&amp;#039;&amp;#039; class. The method receives an object to be visited plus a &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; which brings all necessary information for visiting process. However, the main processing is not inside the &amp;#039;&amp;#039;Visitor&amp;#039;&amp;#039; object but &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;. This class provide methods for registering and retrieving of  visit methods plus method for getting properties that are visitable.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039; in turns use services from &amp;#039;&amp;#039;TypeCache&amp;#039;&amp;#039; for caching serializable properties and &amp;#039;&amp;#039;DelegateHelper&amp;#039;&amp;#039; to help it overcomes some reflection limitation.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039; provides 2 methods to deal with visit method&amp;#039;s implementation.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
     protected void AddVisitMethod&amp;lt;T&amp;gt;(Action&amp;lt;T, TContext&amp;gt; visit);&lt;br /&gt;
     internal Action&amp;lt;object, TContext&amp;gt; GetVisitDelegate(Type type)&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;AddVisitMethod&amp;#039;&amp;#039;: register a visit method for a specific &amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;GetVisitDelegate&amp;#039;&amp;#039;: get a visit method for a specific &amp;#039;&amp;#039;Type&amp;#039;&amp;#039;. Visit method&amp;#039;s searching process is as below:&lt;br /&gt;
:# Search for exact match of the required &amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&lt;br /&gt;
:# Search for matches with parent types =&amp;gt; return the first registered parent&amp;#039;s &amp;#039;&amp;#039;Type&amp;#039;&amp;#039;&lt;br /&gt;
:# If nothing is found and there is a visit method for &amp;#039;&amp;#039;object&amp;#039;&amp;#039; type then return this visit method&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;PropertyInfoWrapper&amp;#039;&amp;#039; contains the most tricky of the implementation (the detail can be found in section Lession Learn).&lt;br /&gt;
&lt;br /&gt;
== How to implement &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;? ==&lt;br /&gt;
See [[TableChart style applier]] for a complete implementation of &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039;. But merely said, the implementation of &amp;#039;&amp;#039;VisitMethodImpl&amp;#039;&amp;#039; &amp;#039;&amp;#039;&amp;#039;MUST&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
* Provide a type that inherits from &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; or can use the &amp;#039;&amp;#039;VisitContext&amp;#039;&amp;#039; itself&lt;br /&gt;
* Create private method that conform to type &amp;#039;&amp;#039;Action&amp;lt;T, VisitContext&amp;gt;&amp;#039;&amp;#039; where &amp;#039;&amp;#039;T&amp;#039;&amp;#039; is the accepted type&lt;br /&gt;
* In constructor, register all methods that can be used as visit methods&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
internal abstract class StyleApplier : VisitMethodImpl&lt;br /&gt;
{&lt;br /&gt;
      protected StyleApplier()&lt;br /&gt;
      {&lt;br /&gt;
         AddVisitMethod&amp;lt;TableBorderLineStyle&amp;gt;(Apply);&lt;br /&gt;
         AddVisitMethod&amp;lt;PaddingProperty&amp;gt;(Apply);&lt;br /&gt;
         AddVisitMethod&amp;lt;object&amp;gt;(Apply);&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      public void Apply(TableBorderLineStyle borderLineStyle, VisitContext context) { }&lt;br /&gt;
     &lt;br /&gt;
      public void Apply(PaddingProperty padding, VisitContext context) { }&lt;br /&gt;
    &lt;br /&gt;
      public void Apply(object genericStyle, VisitContext context) { } &lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Lesson Learn ==&lt;br /&gt;
The biggest lesson learn that must be shared is using of Reflection against generic method. &lt;br /&gt;
&lt;br /&gt;
=== Collection of delegate ===&lt;br /&gt;
&lt;br /&gt;
The generic method syntax is very nice in term of strongly typed and is best for end-developer. For example: it is better to write code as &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
    public void Apply(PaddingProperty padding, VisitContext context)&lt;br /&gt;
    {&lt;br /&gt;
         ...&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
instead of &lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
    public void Apply(object padding, VisitContext context)&lt;br /&gt;
    {&lt;br /&gt;
         PaddingProperty p = padding as PaddingProperty;&lt;br /&gt;
         ...&lt;br /&gt;
    }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
However, we cannot store a generic method of different type to the same collection, for example: &amp;#039;&amp;#039;Action&amp;lt;int, VisitContext&amp;gt;&amp;#039;&amp;#039; and &amp;#039;&amp;#039;Action&amp;lt;string, Context&amp;gt;&amp;#039;&amp;#039; are considered different and can not be stored in same collection. With dynamic implementation we need to store all visit method in one collection in order to be capable of searching. And the generic type for all visit method must be &amp;#039;&amp;#039;Action&amp;lt;object, VisitContext&amp;gt;&amp;#039;&amp;#039;. The following code show the dictionary of visit methods and how it can be used.&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
   public class VisitMethodImpl&amp;lt;TContext&amp;gt; where TContext : VisitContext&lt;br /&gt;
   {&lt;br /&gt;
      private readonly IDictionary&amp;lt;Type, Action&amp;lt;object, TContext&amp;gt;&amp;gt; _visitMethodMapping =&lt;br /&gt;
         new Dictionary&amp;lt;Type, Action&amp;lt;object, TContext&amp;gt;&amp;gt;();&lt;br /&gt;
&lt;br /&gt;
      protected void AddVisitMethod&amp;lt;T&amp;gt;(Action&amp;lt;T, TContext&amp;gt; visit)&lt;br /&gt;
      {&lt;br /&gt;
         if (visit == null) throw new ArgumentNullException(&amp;quot;visit&amp;quot;);&lt;br /&gt;
&lt;br /&gt;
         // Convert to generic visit with target visit object as {object}&lt;br /&gt;
         Action&amp;lt;object, TContext&amp;gt; genericMethod = (o, c) =&amp;gt; visit((T)o, c);&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
Line 11 contains a conversion from &amp;#039;&amp;#039;Action&amp;lt;T, TContext&amp;gt;&amp;#039;&amp;#039; to &amp;#039;&amp;#039;Action&amp;lt;object, TContext&amp;gt;&amp;#039;&amp;#039; for storing into the collection. Please distinguish between the declaration aspect and runtime aspect of the statement. So, there are actually 2 delegates&lt;br /&gt;
# &amp;#039;&amp;#039;Action&amp;lt;T, TContext&amp;gt;&amp;#039;&amp;#039; =&amp;gt; this is the &amp;#039;&amp;#039;&amp;#039;REAL&amp;#039;&amp;#039;&amp;#039; implementation provided by end-developers.&lt;br /&gt;
# &amp;#039;&amp;#039;Action&amp;lt;object, TContext&amp;gt;&amp;#039;&amp;#039; =&amp;gt; this act as a place holder for the above delegate in the dictionary, it receives an instance of type &amp;#039;&amp;#039;T&amp;#039;&amp;#039; as parameter, but in form of a non-typed &amp;#039;&amp;#039;object&amp;#039;&amp;#039;. Thus, the instance must be cast into type &amp;#039;&amp;#039;T&amp;#039;&amp;#039; and pass to the &amp;#039;&amp;#039;&amp;#039;REAL&amp;#039;&amp;#039;&amp;#039; method.&lt;br /&gt;
&lt;br /&gt;
=== &amp;#039;&amp;#039;PropertyInfoWrapper&amp;#039;&amp;#039; ===&lt;br /&gt;
Dynamically inspecting of object requires some kinds of reflection. For example, to get/set value from a property we need a &amp;#039;&amp;#039;PropertyInfo&amp;#039;&amp;#039;. From that &amp;#039;&amp;#039;PropertyInfo&amp;#039;&amp;#039; we can then access &amp;#039;&amp;#039;GetGetMethod&amp;#039;&amp;#039;/&amp;#039;&amp;#039;GetSetMethod&amp;#039;&amp;#039; to get/set value from/to the property. As the nature of reflection, it requires some overhead calling method dynamically thus decrease the performance a bit. In order to overcome the issue, the model depicted at this [http://msmvps.com/blogs/jon_skeet/archive/2008/08/09/making-reflection-fly-and-exploring-delegates.aspx link] has been followed.&lt;br /&gt;
&lt;br /&gt;
The code of &amp;#039;&amp;#039;PropertyInfoWrapper&amp;#039;&amp;#039; is rather simple&lt;br /&gt;
&amp;lt;source lang=&amp;quot;csharp&amp;quot;&amp;gt;&lt;br /&gt;
   public class PropertyInfoWrapper&lt;br /&gt;
   {&lt;br /&gt;
      public PropertyInfo PropertyInfo { get; private set; }&lt;br /&gt;
      public Action&amp;lt;object, object&amp;gt; SetValue { get; private set; }&lt;br /&gt;
      public Func&amp;lt;object, object&amp;gt; GetValue { get; private set; }&lt;br /&gt;
&lt;br /&gt;
      public PropertyInfoWrapper(PropertyInfo p)&lt;br /&gt;
         : this(p, p.CreateSetValueDelegate(), p.CreateGetValueDelegate())&lt;br /&gt;
      {&lt;br /&gt;
      }&lt;br /&gt;
&lt;br /&gt;
      public PropertyInfoWrapper(PropertyInfo p, Action&amp;lt;object, object&amp;gt; setValue, Func&amp;lt;object, object&amp;gt; getValue)&lt;br /&gt;
      {&lt;br /&gt;
         Debug.Assert(p != null);&lt;br /&gt;
         PropertyInfo = p;&lt;br /&gt;
         SetValue = setValue ?? ((o, v) =&amp;gt; { }); // Do nothing if there is no set method; &lt;br /&gt;
         GetValue = getValue ?? (o =&amp;gt; null); // Return null if there is no get method; &lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* The class contains an internal &amp;#039;&amp;#039;PropertyInfo&amp;#039;&amp;#039; which point to the real property, and 2 delegates for getting/setting value from/to that property&lt;br /&gt;
* There are 2 constructors, the second one allow developers provide custom implementation of get/set method. If no custom implementation is required, then the 2 delegates is created using 2 methods fetched from &amp;#039;&amp;#039;GetGetMethod&amp;#039;&amp;#039; and &amp;#039;&amp;#039;GetSetMethod&amp;#039;&amp;#039; using above mentioned link.&lt;br /&gt;
&lt;br /&gt;
== Document revisions ==&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Version No.&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Date&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Changed By&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Description&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
| &amp;#039;&amp;#039;&amp;#039;Svn revision&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
|-&lt;br /&gt;
| 0.1 &lt;br /&gt;
| 21.09.2009&lt;br /&gt;
| Nguyen Trung Chinh &lt;br /&gt;
| First version&lt;br /&gt;
| 56374&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Catglobe</name></author>
	</entry>
</feed>