Sophie

Sophie

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

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Transient Fields In .NET</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Transient Fields In .NET</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><font color="#990000">This topic applies to .NET version only</font></p>There are different ways to prevent fields persistence in .NET:<br>

<ul><li>You can use the [com.db4o.Transient] or [NonSerialized] attribute to indicate that a field is not part of the persistent state of an object.</li><li>You can use any built-in .NET attribute or
define your own attribute class and mark it transient for db4o.</li></ul><p>For example, let's create a FieldTransient attribute and mark it to prevent object persistence:</p><span name="cs_wiki_filter" csw_filters="cs">

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">FieldTransient.cs</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58"><div><!--

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

--><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Open_Text').style.display='inline';"/><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_0_67_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Copyright (C) 2004 - 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.SelectivePersistence
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_133_224_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"/>  [AttributeUsage(AttributeTargets.Field)]
</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;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> FieldTransient: Attribute
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Open_Text').style.display='inline';"/>  </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsFieldTransient.Cs_FieldTransient.Cs_571_58_218_222_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">09</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;">10</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">MarkTransientExample.cs: <span class="fscMemberName">ConfigureTransient</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79"><div><!--

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

--><span style="color: #008080;">1</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> IConfiguration ConfigureTransient()
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_ConfigureTransient_629_79_53_266_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">3</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;">4</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            configuration.MarkTransient(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4objects.Db4odoc.SelectivePersistence.FieldTransient</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">5</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;"> configuration;
</span><span style="color: #008080;">6</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>    }</span></span></div></pre></div></div> <br></p>

</span>

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">FieldTransient.vb</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58"><div><!--

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

--><span style="color: #008080;">1</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #008000;">'</span><span style="color: #008000;"> Copyright (C) 2004 - 2007 db4objects Inc. http://www.db4o.com </span><span style="color: #008000;">
</span><span style="color: #008080;">2</span><span style="color: #008000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_65_248_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.SelectivePersistence
</span><span style="color: #008080;">3</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;">AttributeUsage(AttributeTargets.Field)</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> _
</span><span style="color: #008080;">4</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class FieldTransient</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsFieldTransient.Vb_FieldTransient.Vb_781_58_173_234_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> FieldTransient
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Inherits</span><span style="color: #000000;"> Attribute
</span><span style="color: #008080;">6</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;">7</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">MarkTransientExample.vb: <span class="fscMemberName">ConfigureTransient</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79"><div><!--

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

--><span style="color: #008080;">1</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_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="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function ConfigureTransient()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_ConfigureTransient_839_79_14_294_Open_Text"><span style="color: #0000FF;">Function</span><span style="color: #000000;"> ConfigureTransient() </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IConfiguration
</span><span style="color: #008080;">2</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;">3</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            configuration.MarkTransient(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Db4objects.Db4odoc.SelectivePersistence.FieldTransient</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">4</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;"> configuration
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Function</span></span></div></pre></div></div> <br></p>

</span>Let's use the newly-defined FieldTransient attribute and the system-provided Transient, and compare the results:

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">Test.cs</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48"><div><!--

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

--><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Open_Text').style.display='inline';"/><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_0_67_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Copyright (C) 2004 - 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: #0000FF;">namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.SelectivePersistence
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_132_588_Open_Text"><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;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> Test
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Open_Text').style.display='inline';"/>  </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_154_586_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"/>        [Db4objects.Db4o.Transient]
</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;"> you can also use [NonSerializedAttribute]</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;">        </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> _transientField;
</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;">string</span><span style="color: #000000;"> _persistentField;
</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;"> Test(</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> transientField, </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> persistentField)
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_368_449_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"/>      _transientField </span><span style="color: #000000;">=</span><span style="color: #000000;"> transientField;
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>      _persistentField </span><span style="color: #000000;">=</span><span style="color: #000000;"> persistentField;
</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: #008080;">18</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;">19</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTest.Cs_Test.Cs_1103_48_490_583_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"/>      </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Test: persistent: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _persistentField </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">, transient: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _transientField ;
</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/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/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">Test.vb</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48"><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) 2004 - 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: #0000FF;">Imports</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: #0000FF;">Imports</span><span style="color: #000000;"> Db4objects.Db4o
</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="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_105_785_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.SelectivePersistence
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class Test</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_166_771_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> Test
</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: #000000;">&lt;</span><span style="color: #000000;">Transient()</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> _transientField </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;">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;"> You can also use &lt;NonSerialized()&gt; Dim _transientField As String</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;">        </span><span style="color: #008000;">'</span><span style="color: #008000;"> and mark the class &lt;Serializable()&gt;</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;">        </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> _persistentField </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: #008080;">12</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub New()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_405_585_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;"> transientField </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;"> persistentField </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;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _transientField </span><span style="color: #000000;">=</span><span style="color: #000000;"> transientField
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _persistentField </span><span style="color: #000000;">=</span><span style="color: #000000;"> persistentField
</span><span style="color: #008080;">15</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;">16</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Overrides</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function ToString()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTest.Vb_Test.Vb_1215_48_612_757_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;">18</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: #800000;">&quot;</span><span style="color: #800000;">Test: persistent: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _persistentField </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">, transient: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _transientField
</span><span style="color: #008080;">19</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;">20</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;">21</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>

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">TestCustomized.cs</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58"><div><!--

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

--><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Open_Text').style.display='inline';"/><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_0_67_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Copyright (C) 2004 - 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.SelectivePersistence
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_118_581_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;"> TestCustomized
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Open_Text').style.display='inline';"/>  </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_150_579_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"/>        [Db4objects.Db4odoc.SelectivePersistence.FieldTransient]
</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;">string</span><span style="color: #000000;"> _transientField;
</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;">string</span><span style="color: #000000;"> _persistentField;
</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 src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> TestCustomized(</span><span style="color: #0000FF;">string</span><span style="color: #000000;"> transientField, </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> persistentField)
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_350_431_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"/>      _transientField </span><span style="color: #000000;">=</span><span style="color: #000000;"> transientField;
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>      _persistentField </span><span style="color: #000000;">=</span><span style="color: #000000;"> persistentField;
</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;"> </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;">17</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsTestCustomized.Cs_TestCustomized.Cs_1323_58_472_576_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"/>      </span><span style="color: #0000FF;">return</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Customized test: persistent: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _persistentField </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">, transient: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _transientField ;
</span><span style="color: #008080;">19</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;">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/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">TestCustomized.vb</span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58"><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) 2004 - 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="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Open_Text').style.display='inline';"/></span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_66_690_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.SelectivePersistence
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Open_Text').style.display='inline';"/>    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class TestCusomized</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_127_676_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> TestCusomized
</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: #000000;">&lt;</span><span style="color: #000000;">Db4objects.Db4odoc.SelectivePersistence.FieldTransient()</span><span style="color: #000000;">&gt;</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> _transientField </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 src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> _persistentField </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"/>
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub New()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_299_479_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;"> transientField </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;"> persistentField </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"/>            _transientField </span><span style="color: #000000;">=</span><span style="color: #000000;"> transientField
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            _persistentField </span><span style="color: #000000;">=</span><span style="color: #000000;"> persistentField
</span><span style="color: #008080;">11</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;">12</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Open_Text').style.display='inline';"/>        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Overrides</span><span style="color: #000000;"> </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Function ToString()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsTestCustomized.Vb_TestCustomized.Vb_1445_58_506_662_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;">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;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Customized test: persistent: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _persistentField </span><span style="color: #000000;">+</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">, transient: </span><span style="color: #800000;">&quot;</span><span style="color: #000000;"> </span><span style="color: #000000;">+</span><span style="color: #000000;"> _transientField
</span><span style="color: #008080;">15</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;">16</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;">17</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>

</span>

<p>We will save and retrieve both Test and TestCustomized objects, having transient fields defined in different manner:<br></p>

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">MarkTransientExample.cs: <span class="fscMemberName">SaveObjects</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76"><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;">private</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;"> SaveObjects(IConfiguration configuration)
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_64_459_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"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(configuration, Db4oFileName);
</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 id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Open_Text').style.display='inline';"/>      </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_199_409_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"/>        Test test </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Test(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Transient string</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Persistent string</span><span style="color: #800000;">&quot;</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"/>        container.Set(test);
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        TestCustomized testc </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> TestCustomized(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Transient string</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">,</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Persistent string</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.Set(testc);
</span><span style="color: #008080;">11</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;">12</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;">13</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Open_Text').style.display='inline';"/>      </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_SaveObjects_1698_76_426_455_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"/>        container.Close();
</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/ExpandedBlockEnd.gif" align="top"/>    }</span></span></div></pre></div></div><div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">MarkTransientExample.cs: <span class="fscMemberName">RetrieveObjects</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76"><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;">private</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;"> RetrieveObjects()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Open_Text').style.display='inline';"/>    </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_40_321_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"/>            IObjectContainer container </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(Db4oFileName);
</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;">try</span><span style="color: #000000;"> 
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Open_Text').style.display='inline';"/>      </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_130_271_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"/>        IQuery query </span><span style="color: #000000;">=</span><span style="color: #000000;"> container.Query();
</span><span style="color: #008080;">07</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;">(</span><span style="color: #0000FF;">object</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"/>        IList result </span><span style="color: #000000;">=</span><span style="color: #000000;"> query.Execute();
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        ListResult(result);
</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: #0000FF;">finally</span><span style="color: #000000;"> 
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Open_Text').style.display='inline';"/>      </span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceCS.ZipsMarkTransientExample.Cs_MarkTransientExample.Cs_RetrieveObjects_1774_76_288_317_Open_Text"><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.Close();
</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/ExpandedBlockEnd.gif" align="top"/>    }</span></span></div></pre></div></div> <br></p>

</span>

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

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">MarkTransientExample.vb: <span class="fscMemberName">SaveObjects</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76"><div><!--

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

--><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_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="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub SaveObjects()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_SaveObjects_1923_76_14_572_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> SaveObjects(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> configuration </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IConfiguration)
</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;"> container </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(configuration, Db4oFileName)
</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;">Try</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;">Dim</span><span style="color: #000000;"> test </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Test </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Test(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Transient string</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Persistent string</span><span style="color: #800000;">&quot;</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"/>                container.Set(test)
</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;">Dim</span><span style="color: #000000;"> testc </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> TestCusomized </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> TestCusomized(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Transient string</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Persistent string</span><span style="color: #800000;">&quot;</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"/>                container.Set(testc)
</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;">Finally</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.Close()
</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">12</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">MarkTransientExample.vb: <span class="fscMemberName">RetrieveObjects</span></span></div><div class="fscCode"><pre ID="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76"><div><!--

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

--><span style="color: #008080;">01</span><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Open_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Closed_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Closed_Text').style.display='inline';"/><img id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Closed_Text').style.display='none'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Open_Image').style.display='inline'; document.getElementById('ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_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="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub RetrieveObjects()</span><span id="ResourcesReferenceTuningSelective_PersistenceselectivePersistenceVB.ZipsMarkTransientExample.Vb_MarkTransientExample.Vb_RetrieveObjects_1999_76_14_418_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> RetrieveObjects()
</span><span style="color: #008080;">02</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;"> Db4oFactory.OpenFile(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;">Try</span><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;">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;">05</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;">(</span><span style="color: #0000FF;">Object</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: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IList </span><span style="color: #000000;">=</span><span style="color: #000000;"> query.Execute()
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                ListResult(result)
</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;">Finally</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"/>                container.Close()
</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">11</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> <br></p>

</span>You will see the identical results independently of the way the transiency is defined.<br></div>
    </div>
    <div id="footer">
					This revision (2) was last Modified 2007-04-28T10:48:50 by Tetyana.
				</div>
  </body>
</html>