Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 677

db4o-doc-7.4-2.fc13.i686.rpm

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>TSerializable Translator</title>
    <link rel="stylesheet" type="text/css" href="../../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>TSerializable Translator</h1><script>
//We attach this function to a browser object as a variable so that if multiple of these blocks are
//present on the same page, then they will simply over-write eachother with the same function instead
//of generating a naming collision.
window.WikiCodeFormattingCopyToClipboard = function copyToClipboard(sID){
	var sContent = document.getElementById(sID).innerText;
	if( window.clipboardData && clipboardData.setData )
	{
		clipboardData.setData("Text", sContent);
	}
	else
	{
		alert("You must enable javascript access to your clipboard for this feature to work. Please referr to your browser documentation or Google search for instructions.");
	}
}
</script><p>TSerializable
translator allows persistence of classes that do not have a constructor acceptable
for db4o (For more information see <a href="../../translators.html" class="wikiLink">Translators</a>).
Under the hood this translator converts an object to a memory stream on store
and restores it upon instantiation. The limitations of this translator:</p>

<ul><li>if the stored type is refactored, the
     object value won't be retrievable from the database;</li><li>the translator will be useless if
     querying for object fields is required (unless each object is fully
     instantiated before querying).</li></ul>

<p>TSerializable
translator should be used only with classes implementing java.io.Serializable interface (Java) or using [Serializable] attribute (.NET).</p>



<span name="cs_wiki_filter" csw_filters="cs">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">Pilot.cs</span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Open_Text').style.display='inline';"/><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_0_60_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Copyright (C) 2007 db4objects Inc. </span><span style="color: #008000; text-decoration: underline;">http://www.db4o.com</span><span style="color: #008000;"> </span><span style="color: #008000;">*/</span></span><span style="color: #000000;">
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> System;
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.BuiltInTranslators
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Open_Text').style.display='inline';"/></span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_124_843_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    [Serializable]
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> Pilot
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Open_Text').style.display='inline';"/>    </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_165_841_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> _name;
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> _points;
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> Pilot()
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_256_268_Open_Text"><span style="color: #000000;">{ 
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> Pilot(</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name, </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> points)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_324_391_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _name </span><span style="color: #000000;">=</span><span style="color: #000000;"> name;
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _points </span><span style="color: #000000;">=</span><span style="color: #000000;"> points;
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Name
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_428_588_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">get</span><span style="color: #000000;">
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_458_503_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> _name;
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">set</span><span style="color: #000000;">
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_532_578_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                _name </span><span style="color: #000000;">=</span><span style="color: #000000;"> value;
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> Points
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_624_711_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">get</span><span style="color: #000000;">
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_654_701_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> _points;
</span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">40</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">41</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">42</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">override</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> ToString()
</span><span style="color: #008080;">43</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsPilot.Cs_Pilot.Cs_809_50_763_835_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">44</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;">.Format(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">{0}/{1}</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, _name, _points);
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">46</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>}</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.cs: <span class="fscMemberName">SaveSerializable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> SaveSerializable()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_46_1105_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(Db4oFileName);
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IConfiguration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration();
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">//</span><span style="color: #008000;"> configure class as serializable</span><span style="color: #008000;">
</span><span style="color: #008080;">06</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            configuration.ObjectClass(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot)).Translate(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TSerializable());
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database(configuration);
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_407_1094_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_445_673_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    Pilot pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 1</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">99</span><span style="color: #000000;">);
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    container.Set(pilot);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 2</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">100</span><span style="color: #000000;">);
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    container.Set(pilot);
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Db4oException ex)
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_731_829_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4o Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception ex)
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_883_983_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveSerializable_863_87_1024_1080_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.cs: <span class="fscMemberName">TestSerializable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> TestSerializable()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_46_1477_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            SaveSerializable();
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IConfiguration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration();
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">//</span><span style="color: #008000;"> configure class as serializable to retrieve correctly</span><span style="color: #008000;">
</span><span style="color: #008080;">06</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            configuration.ObjectClass(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot)).Translate(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TSerializable());
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database(configuration);
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (container </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_422_1467_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_460_1046_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Retrieving pilots by name:</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IQuery query </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query();
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    query.Constrain(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot));
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    query.Descend(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">_name</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">).Constrain(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 1</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IObjectSet resultByName </span><span style="color: #000000;">=</span><span style="color: #000000;"> query.Execute();
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(resultByName);
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Retrieve all pilot objects:</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IList</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> result </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Pilot</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">();
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result);
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Db4oException ex)
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1104_1202_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4o Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception ex)
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1256_1356_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message);
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">finally</span><span style="color: #000000;">
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestSerializable_954_87_1397_1453_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase();
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

</span>

<p><span name="cs_wiki_filter" csw_filters="vb"></p>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">Pilot.vb</span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #008000;">'</span><span style="color: #008000;"> Copyright (C) 2007 db4objects Inc. http://www.db4o.com </span><span style="color: #008000;">
</span><span style="color: #008080;">02</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">Imports</span><span style="color: #000000;"> System
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Open_Text').style.display='inline';"/></span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_75_943_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.BuiltInTranslators
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #000000;">&lt;</span><span style="color: #000000;">Serializable()</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> _
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Open_Text').style.display='inline';"/>    </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class Pilot</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_150_929_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> Pilot
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> _name </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> _points </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub New()</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_243_268_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;">()
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub New()</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_285_409_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;">(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> name </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">, </span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> points </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><span style="color: #000000;">)
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _name </span><span style="color: #000000;">=</span><span style="color: #000000;"> name
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _points </span><span style="color: #000000;">=</span><span style="color: #000000;"> points
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span><span style="color: #000000;">
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Property Name()</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_426_626_Open_Text"><span style="color: #0000FF;">Property</span><span style="color: #000000;"> Name() </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Get</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> _name
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Get</span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Set</span><span style="color: #000000;">(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> value </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">)
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                _name </span><span style="color: #000000;">=</span><span style="color: #000000;"> value
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Set</span><span style="color: #000000;">
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Property</span></span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">ReadOnly</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Property Points()</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_652_768_Open_Text"><span style="color: #0000FF;">Property</span><span style="color: #000000;"> Points() </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><span style="color: #000000;">
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Get</span><span style="color: #000000;">
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> _points
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Get</span><span style="color: #000000;">
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Property</span></span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Overloads</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Overrides</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function ToString()</span><span id="..BuiltInTranslatorsVB.ZipsPilot.Vb_Pilot.Vb_1112_50_805_915_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> ToString() </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Return</span><span style="color: #000000;"> </span><span style="color: #0000FF;">String</span><span style="color: #000000;">.Format(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">{0}/{1}</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, _name, _points)
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #0000FF;">End Class</span></span><span style="color: #000000;">
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/></span><span style="color: #0000FF;">End Namespace</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.vb: <span class="fscMemberName">SaveSerializable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SaveSerializable()</span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveSerializable_1166_87_14_988_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SaveSerializable()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(Db4oFileName)
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> configuration </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IConfiguration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration()
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> configure class as serializable</span><span style="color: #008000;">
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            configuration.ObjectClass(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot)).Translate(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> TSerializable())
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database(configuration)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">IsNot</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> pilot </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 1</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">99</span><span style="color: #000000;">)
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    container.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](pilot)
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 2</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">100</span><span style="color: #000000;">)
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    container.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](pilot)
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Db4oException
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4o Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;">
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.vb: <span class="fscMemberName">TestSerializable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87"><div><!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

--><span style="color: #008080;">01</span><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub TestSerializable()</span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestSerializable_1257_87_14_1360_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> TestSerializable()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            SaveSerializable()
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> configuration </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IConfiguration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration()
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> configure class as serializable to retrieve correctly</span><span style="color: #008000;">
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            configuration.ObjectClass(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot)).Translate(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> TSerializable())
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database(configuration)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> container </span><span style="color: #0000FF;">IsNot</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Retrieving pilots by name:</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> query </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IQuery </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query()
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    query.Constrain(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot))
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    query.Descend(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">_name</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">).Constrain(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test Pilot 1</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> resultByName </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> query.Execute()
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(resultByName)
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Retrieve all pilot objects:</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot) </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> Pilot)()
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ListResult(result)
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Db4oException
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4o Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    System.Console.WriteLine(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">System Exception: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> ex.Message)
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Finally</span><span style="color: #000000;">
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>

</span>

</div>
    </div>
    <div id="footer">
					This revision (3) was last Modified 2007-08-13T17:32:15 by Tetyana.
				</div>
  </body>
</html>