Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 864d1c3c3cd8df4e3a2692faf8776e05 > files > 676

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>TNull Translator</title>
    <link rel="stylesheet" type="text/css" href="../../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>TNull 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>TNull translator is used to notify db4o engine that the class
data should not be stored. Db4o uses this translator internally for delegates.</p>

<p>Let's look at an example:</p>



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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">NotStorable.cs</span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56"><div><!--

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

--><span style="color: #008080;">01</span><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Open_Text').style.display='inline';"/><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_0_60_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_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;">namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.BuiltInTranslators
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Open_Text').style.display='inline';"/></span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_109_375_Open_Text"><span style="color: #000000;">{
</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: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> NotStorable
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Open_Text').style.display='inline';"/>    </span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_144_373_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"/>        </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> _name;
</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;">public</span><span style="color: #000000;"> NotStorable(</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> name)
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_216_253_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"/>            _name </span><span style="color: #000000;">=</span><span style="color: #000000;"> name;
</span><span style="color: #008080;">10</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;">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;"> </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;">13</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsNotStorable.Cs_NotStorable.Cs_241_56_305_367_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">14</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: #000000;">==</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;"> </span><span style="color: #000000;">?</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">null</span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> : _name;
</span><span style="color: #008080;">15</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;">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/ExpandedBlockEnd.gif" align="top"/>}</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.cs: <span class="fscMemberName">SaveNotStorable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86"><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;"> SaveNotStorable()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_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_SaveNotStorable_301_86_45_1126_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_45_1126_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 NotStorable class with TNull translator to prevent its storage</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;">(NotStorable)).Translate(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TNull());
</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_SaveNotStorable_301_86_445_1116_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_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_SaveNotStorable_301_86_445_1116_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_445_1116_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_SaveNotStorable_301_86_483_695_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_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_SaveNotStorable_301_86_483_695_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_483_695_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"/>                    NotStorable ns </span><span style="color: #000000;">=</span><span style="color: #000000;">  </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> NotStorable(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">test1</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"/>                    container.Set(ns);
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ns </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> NotStorable(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">test2</span><span style="color: #800000;">&quot;</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(ns);
</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_SaveNotStorable_301_86_753_851_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_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_SaveNotStorable_301_86_753_851_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_753_851_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_SaveNotStorable_301_86_905_1005_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_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_SaveNotStorable_301_86_905_1005_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_905_1005_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_SaveNotStorable_301_86_1046_1102_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_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_SaveNotStorable_301_86_1046_1102_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_SaveNotStorable_301_86_1046_1102_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/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.cs: <span class="fscMemberName">TestTNull</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80"><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;"> TestTNull()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_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_TestTNull_391_80_39_908_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Open_Text').style.display='inline';"/>        </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_39_908_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"/>            SaveNotStorable();
</span><span style="color: #008080;">04</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();
</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: #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;">06</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_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_TestTNull_391_80_172_898_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Open_Text').style.display='inline';"/>            </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_172_898_Open_Text"><span style="color: #000000;">{
</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;">try</span><span style="color: #000000;">
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_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_TestTNull_391_80_210_477_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_210_477_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: #008000;">//</span><span style="color: #008000;"> Trying to retrieve</span><span style="color: #008000;">
</span><span style="color: #008080;">10</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                    IList</span><span style="color: #000000;">&lt;</span><span style="color: #000000;">NotStorable</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;">NotStorable</span><span style="color: #000000;">&gt;</span><span style="color: #000000;">();
</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: #008000;">//</span><span style="color: #008000;"> As the class is configured with TNull, the data should be null</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                    ListResult(result);
</span><span style="color: #008080;">13</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;">14</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;">15</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_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_TestTNull_391_80_535_633_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_535_633_Open_Text"><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"/>                    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;">17</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;">18</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;">19</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_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_TestTNull_391_80_687_787_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_687_787_Open_Text"><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"/>                    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;">21</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;">22</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;">23</span><span style="color: #000000;"><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_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_TestTNull_391_80_828_884_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Open_Text').style.display='inline';"/>                </span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..BuiltInTranslatorsCS.ZipsBuiltInTranslatorsExample.Cs_BuiltInTranslatorsExample.Cs_TestTNull_391_80_828_884_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"/>                    CloseDatabase();
</span><span style="color: #008080;">25</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;">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/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>

</span>

<span name="cs_wiki_filter" csw_filters="vb"><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">NotStorable.vb</span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52"><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 id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Open_Text').style.display='inline';"/></span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_59_424_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.BuiltInTranslators
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class NotStorable</span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_118_410_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> NotStorable
</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: #0000FF;">Private</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;">06</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub New()</span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_183_253_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: #008080;">07</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;">08</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;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_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.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function ToString()</span><span id="..BuiltInTranslatorsVB.ZipsNotStorable.Vb_NotStorable.Vb_531_52_290_396_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;">11</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;">IIf</span><span style="color: #000000;">(_name </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;">, </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">null</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, _name)
</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 Function</span></span><span style="color: #000000;">
</span><span style="color: #008080;">13</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;">14</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> <br></p>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">BuiltInTranslatorsExample.vb: <span class="fscMemberName">SaveNotStorable</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86"><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_SaveNotStorable_596_86_14_1002_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_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_SaveNotStorable_596_86_14_1002_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_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_SaveNotStorable_596_86_14_1002_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SaveNotStorable()</span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_SaveNotStorable_596_86_14_1002_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SaveNotStorable()
</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 NotStorable class with TNull translator to prevent its storage</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;">(NotStorable)).Translate(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> TNull())
</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;"> ns </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> NotStorable(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">test1</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"/>                    container.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](ns)
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    ns </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> NotStorable(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">test2</span><span style="color: #800000;">&quot;</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;">](ns)
</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/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">TestTNull</span></span></div><div class="fscCode"><pre ID="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80"><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_TestTNull_686_80_14_796_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_Open_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_Closed_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_Closed_Text').style.display='inline';"/><img id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_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_TestTNull_686_80_14_796_Closed_Text').style.display='none'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_Open_Image').style.display='inline'; document.getElementById('..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_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_TestTNull_686_80_14_796_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub TestTNull()</span><span id="..BuiltInTranslatorsVB.ZipsBuiltInTranslatorsExample.Vb_BuiltInTranslatorsExample.Vb_TestTNull_686_80_14_796_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> TestTNull()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            SaveNotStorable()
</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;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Database()
</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: #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;">05</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;">06</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;"> Trying to retrieve</span><span style="color: #008000;">
</span><span style="color: #008080;">07</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                    </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;"> NotStorable) </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query(</span><span style="color: #0000FF;">Of</span><span style="color: #000000;"> NotStorable)()
</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: #008000;">'</span><span style="color: #008000;"> As the class is configured with TNull, the data should be null</span><span style="color: #008000;">
</span><span style="color: #008080;">09</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                    ListResult(result)
</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;">Catch</span><span style="color: #000000;"> ex </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Db4oException
</span><span style="color: #008080;">11</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;">12</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;">13</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;">14</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;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    CloseDatabase()
</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">18</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>

<p>If you will run this example you will see that though the
information about the NotStorable class was saved to the database, the
retrieved value is null.</p>



</div>
    </div>
    <div id="footer">
					This revision (2) was last Modified 2007-08-13T15:59:38 by Tetyana.
				</div>
  </body>
</html>