Sophie

Sophie

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

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Simple db4o Server</title>
    <link rel="stylesheet" type="text/css" href="../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Simple db4o Server</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>Let's implement a simple standalone db4o server with a special client that can tell the server to shut itself down gracefully on demand.</P>
<P>First, both the client and the server need some shared configuration information. We will provide this using an interface:</P>

<span name="cs_wiki_filter" csw_filters="cs">
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">ServerConfiguration.cs</span></div><div class="fscCode"><pre ID="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61"><div><!--

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

--><span style="color: #008080;">01</span><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Open_Text').style.display='inline';"/><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_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.ClientServer
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Open_Text').style.display='inline';"/></span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_110_1110_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_116_208_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> Configuration used for StartServer and StopServer.
</span><span style="color: #008080;">06</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">07</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> ServerConfiguration
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_249_1108_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_259_485_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&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: #808080;">///</span><span style="color: #008000;"> the host to be used.
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> If you want to run the client server examples on two computers,
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> enter the computer name of the one that you want to use as server. 
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">14</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">const</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Host </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">localhost</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;  
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_544_637_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">17</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> the database file to be used by the server.
</span><span style="color: #008080;">18</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">19</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">const</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> FileName </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">reference.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
</span><span style="color: #008080;">20</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_703_787_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">22</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> the port to be used by the server.
</span><span style="color: #008080;">23</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">24</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">const</span><span style="color: #000000;"> </span><span style="color: #0000FF;">int</span><span style="color: #000000;"> Port </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800080;">0xdb40</span><span style="color: #000000;">;
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_836_919_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">27</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> the user name for access control.
</span><span style="color: #008080;">28</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">29</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">const</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> User </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsServerConfiguration.Cs_ServerConfiguration.Cs_330_61_975_1056_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">32</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> the pasword for access control.
</span><span style="color: #008080;">33</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">34</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">const</span><span style="color: #000000;"> </span><span style="color: #0000FF;">string</span><span style="color: #000000;"> Password </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>}</span></span></div></pre></div></div>
</span>
<span name="cs_wiki_filter" csw_filters="vb">
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">ServerConfiguration.vb</span></div><div class="fscCode"><pre ID="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61"><div><!--

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

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #008000;">'</span><span style="color: #008000;"> Copyright (C) 2007 db4objects Inc. http://www.db4o.com</span><span style="color: #008000;">
</span><span style="color: #008080;">02</span><span style="color: #008000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Open_Text').style.display='inline';"/></span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_57_1116_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.ClientServer
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_103_195_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">04</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> Configuration used for StartServer and StopServer.
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">06</span><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Open_Text').style.display='inline';"/><span style="color: #000000;">    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class ServerConfiguration</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_206_1102_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> ServerConfiguration
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_240_466_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">08</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> the host to be used.
</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: #808080;">'''</span><span style="color: #008000;"> If you want to run the client server examples on two computers,
</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: #808080;">'''</span><span style="color: #008000;"> enter the computer name of the one that you want to use as server. 
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">12</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Const</span><span style="color: #000000;"> Host </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: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">localhost</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">13</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_525_618_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">15</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> the database file to be used by the server.
</span><span style="color: #008080;">16</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">17</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Const</span><span style="color: #000000;"> File </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: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">reference.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">19</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_682_766_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> the port to be used by the server.
</span><span style="color: #008080;">21</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">22</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Const</span><span style="color: #000000;"> Port </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Integer</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #000000;">&amp;</span><span style="color: #000000;">HDB40
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_821_904_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">25</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> the user name for access control.
</span><span style="color: #008080;">26</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">27</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Const</span><span style="color: #000000;"> User </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: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsServerConfiguration.Vb_ServerConfiguration.Vb_449_61_958_1039_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">30</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> the pasword for access control.
</span><span style="color: #008080;">31</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">32</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Const</span><span style="color: #000000;"> Password </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: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #0000FF;">End Class</span></span><span style="color: #000000;">
</span><span style="color: #008080;">35</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>Now we'll create the server:</P>

<span name="cs_wiki_filter" csw_filters="cs">
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">StartServer.cs</span></div><div class="fscCode"><pre ID="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53"><div><!--

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

--><span style="color: #008080;">01</span><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Open_Text').style.display='inline';"/><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_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;">using</span><span style="color: #000000;"> System.Threading;
</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 src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #0000FF;">using</span><span style="color: #000000;"> Db4objects.Db4o;
</span><span style="color: #008080;">06</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;"> Db4objects.Db4o.Config;
</span><span style="color: #008080;">07</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;"> Db4objects.Db4o.Messaging;
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">09</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.ClientServer
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Open_Text').style.display='inline';"/></span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_236_3117_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_242_822_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> starts a db4o server with the settings from ServerConfiguration. 
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> This is a typical setup for a long running server.
</span><span style="color: #008080;">14</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> The Server may be stopped from a remote location by running
</span><span style="color: #008080;">15</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> StopServer. The StartServer instance is used as a MessageRecipient 
</span><span style="color: #008080;">16</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> and reacts to receiving an instance of a StopServer object.
</span><span style="color: #008080;">17</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> Note that all user classes need to be present on the server side
</span><span style="color: #008080;">18</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> and that all possible calls to alter the db4o
</span><span style="color: #008080;">19</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> configuration need to be executed on the client and on the server.
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">21</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> StartServer : ServerConfiguration, IMessageRecipient
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_896_3115_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_906_1022_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">24</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> setting the value to true denotes that the server should be closed
</span><span style="color: #008080;">25</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">26</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">bool</span><span style="color: #000000;"> stop </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">false</span><span style="color: #000000;">;
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1066_1198_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">29</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> starts a db4o server using the configuration from
</span><span style="color: #008080;">30</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> ServerConfiguration.
</span><span style="color: #008080;">31</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">32</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">string</span><span style="color: #000000;">[] arguments)
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1258_1312_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StartServer().RunServer();
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;"> 
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #008000;">//</span><span style="color: #008000;"> end Main</span><span style="color: #008000;">
</span><span style="color: #008080;">37</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1337_1508_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">39</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> opens the IObjectServer, and waits forever until Close() is called
</span><span style="color: #008080;">40</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> or a StopServer message is being received.
</span><span style="color: #008080;">41</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">42</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> RunServer()
</span><span style="color: #008080;">43</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1548_2471_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">44</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">lock</span><span style="color: #000000;">(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">)
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_1585_2461_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">46</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;"> Using the messaging functionality to redirect all
</span><span style="color: #008080;">47</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> messages to this.processMessage</span><span style="color: #008000;">
</span><span style="color: #008080;">48</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                IConfiguration configuration </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.NewConfiguration();
</span><span style="color: #008080;">49</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                configuration.ClientServer().SetMessageRecipient(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">);
</span><span style="color: #008080;">50</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">51</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                IObjectServer db4oServer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenServer(configuration, FileName, Port);
</span><span style="color: #008080;">52</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                db4oServer.GrantAccess(User, Password);
</span><span style="color: #008080;">53</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                
</span><span style="color: #008080;">54</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;">55</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Open_Text').style.display='inline';"/>                </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2066_2286_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">56</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (</span><span style="color: #000000;">!</span><span style="color: #000000;"> stop)
</span><span style="color: #008080;">57</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Open_Text').style.display='inline';"/>                    </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2120_2268_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">58</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;"> wait forever until Close will change stop variable</span><span style="color: #008000;">
</span><span style="color: #008080;">59</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                        Monitor.Wait(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">);   
</span><span style="color: #008080;">60</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;">61</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;">62</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception e)
</span><span style="color: #008080;">63</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Open_Text').style.display='inline';"/>                </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2339_2411_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">64</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    Console.WriteLine(e.ToString());
</span><span style="color: #008080;">65</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;">66</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                db4oServer.Close();
</span><span style="color: #008080;">67</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;">68</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;">69</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;"> end RunServer</span><span style="color: #008000;">
</span><span style="color: #008080;">70</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">71</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2500_2637_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">72</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> messaging callback
</span><span style="color: #008080;">73</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> see com.db4o.messaging.MessageRecipient#ProcessMessage()
</span><span style="color: #008080;">74</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">75</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> ProcessMessage(IMessageContext context, </span><span style="color: #0000FF;">object</span><span style="color: #000000;"> message)
</span><span style="color: #008080;">76</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2721_2824_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">77</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (message </span><span style="color: #0000FF;">is</span><span style="color: #000000;"> StopServer)
</span><span style="color: #008080;">78</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2774_2814_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">79</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Close();
</span><span style="color: #008080;">80</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;">81</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;">82</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;"> end ProcessMessage</span><span style="color: #008000;">
</span><span style="color: #008080;">83</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">84</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2858_2927_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">85</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> closes this server.
</span><span style="color: #008080;">86</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">87</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Close()
</span><span style="color: #008080;">88</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_2963_3094_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">89</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">lock</span><span style="color: #000000;">(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">)
</span><span style="color: #008080;">90</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStartServer.Cs_StartServer.Cs_607_53_3000_3084_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">91</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                stop </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">true</span><span style="color: #000000;">;
</span><span style="color: #008080;">92</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Monitor.PulseAll(</span><span style="color: #0000FF;">this</span><span style="color: #000000;">);
</span><span style="color: #008080;">93</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;">94</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;">95</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;"> end Close</span><span style="color: #008000;">
</span><span style="color: #008080;">96</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/></span><span style="color: #000000;">    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">97</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">StartServer.vb</span></div><div class="fscCode"><pre ID="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53"><div><!--

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

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #008000;">'</span><span style="color: #008000;"> Copyright (C) 2007 db4objects Inc. http://www.db4o.com</span><span style="color: #008000;">
</span><span style="color: #008080;">02</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #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;"> System.Threading
</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 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;">06</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.Config
</span><span style="color: #008080;">07</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.Messaging
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Open_Text').style.display='inline';"/></span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_188_3159_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.ClientServer
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_234_814_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> starts a db4o server with the settings from ServerConfiguration. 
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> This is a typical setup for a long running server.
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> The Server may be stopped from a remote location by running
</span><span style="color: #008080;">14</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> StopServer. The StartServer instance is used as a MessageRecipient 
</span><span style="color: #008080;">15</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> and reacts to receiving an instance of a StopServer object.
</span><span style="color: #008080;">16</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> Note that all user classes need to be present on the server side
</span><span style="color: #008080;">17</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> and that all possible calls to alter the db4o
</span><span style="color: #008080;">18</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> configuration need to be executed on the client and on the server.
</span><span style="color: #008080;">19</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">20</span><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Open_Text').style.display='inline';"/><span style="color: #000000;">    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class StartServer</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_825_3145_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> StartServer
</span><span style="color: #008080;">21</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Inherits</span><span style="color: #000000;"> ServerConfiguration
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Implements</span><span style="color: #000000;"> IMessageRecipient
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_925_1041_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">24</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> setting the value to true denotes that the server should be closed
</span><span style="color: #008080;">25</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">26</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Private</span><span style="color: #000000;"> [</span><span style="color: #0000FF;">stop</span><span style="color: #000000;">] </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Boolean</span><span style="color: #000000;"> </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">False</span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1092_1224_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">29</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> starts a db4o server using the configuration from
</span><span style="color: #008080;">30</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> ServerConfiguration.
</span><span style="color: #008080;">31</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">32</span><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Open_Text').style.display='inline';"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub Main()</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1246_1372_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> arguments </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;">33</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;"> server </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> StartServer
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            server.RunServer()
</span><span style="color: #008080;">35</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;">36</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;"> end Main</span><span style="color: #008000;">
</span><span style="color: #008080;">37</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1401_1572_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">39</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> opens the IObjectServer, and waits forever until Close() is called
</span><span style="color: #008080;">40</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> or a StopServer message is being received.
</span><span style="color: #008080;">41</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">42</span><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Open_Text').style.display='inline';"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub RunServer()</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_1587_2430_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> RunServer()
</span><span style="color: #008080;">43</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;"> Using the messaging functionality to redirect all</span><span style="color: #008000;">
</span><span style="color: #008080;">44</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;"> messages to this.processMessage</span><span style="color: #008000;">
</span><span style="color: #008080;">45</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;"> 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;">46</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            configuration.ClientServer().SetMessageRecipient(</span><span style="color: #0000FF;">Me</span><span style="color: #000000;">)
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">SyncLock</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Me</span><span style="color: #000000;">
</span><span style="color: #008080;">48</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;"> db4oServer </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectServer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenServer(configuration, File, Port)
</span><span style="color: #008080;">49</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                db4oServer.GrantAccess(User, Password)
</span><span style="color: #008080;">50</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;">51</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> [</span><span style="color: #0000FF;">stop</span><span style="color: #000000;">] </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">52</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;"> wait forever until Close will change stop variable</span><span style="color: #008000;">
</span><span style="color: #008080;">53</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                        Monitor.Wait(</span><span style="color: #0000FF;">Me</span><span style="color: #000000;">)
</span><span style="color: #008080;">54</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">55</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> e </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">56</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    Console.WriteLine(e.ToString())
</span><span style="color: #008080;">57</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;">58</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                db4oServer.Close()
</span><span style="color: #008080;">59</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;">SyncLock</span><span style="color: #000000;">
</span><span style="color: #008080;">60</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;">61</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;"> end RunServer</span><span style="color: #008000;">
</span><span style="color: #008080;">62</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">63</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2464_2601_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">64</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> messaging callback
</span><span style="color: #008080;">65</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> see com.db4o.messaging.MessageRecipient#ProcessMessage()
</span><span style="color: #008080;">66</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">67</span><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Open_Text').style.display='inline';"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub ProcessMessage()</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2616_2845_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> ProcessMessage(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> context </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IMessageContext, </span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> message </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Object</span><span style="color: #000000;">) </span><span style="color: #0000FF;">Implements</span><span style="color: #000000;"> IMessageRecipient.ProcessMessage
</span><span style="color: #008080;">68</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">TypeOf</span><span style="color: #000000;"> message </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> StopServer </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">69</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Close()
</span><span style="color: #008080;">70</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">71</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;">72</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;"> end ProcessMessage</span><span style="color: #008000;">
</span><span style="color: #008080;">73</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">
</span><span style="color: #008080;">74</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2884_2953_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">75</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> closes this server.
</span><span style="color: #008080;">76</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">77</span><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Open_Text').style.display='inline';"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub Close()</span><span id="....ClientserverVB.ZipsStartServer.Vb_StartServer.Vb_718_53_2968_3111_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> Close()
</span><span style="color: #008080;">78</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">SyncLock</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Me</span><span style="color: #000000;">
</span><span style="color: #008080;">79</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                [</span><span style="color: #0000FF;">stop</span><span style="color: #000000;">] </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">True</span><span style="color: #000000;">
</span><span style="color: #008080;">80</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Monitor.PulseAll(</span><span style="color: #0000FF;">Me</span><span style="color: #000000;">)
</span><span style="color: #008080;">81</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;">SyncLock</span><span style="color: #000000;">
</span><span style="color: #008080;">82</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;">83</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;"> end Close</span><span style="color: #008000;">
</span><span style="color: #008080;">84</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/></span><span style="color: #000000;">    </span><span style="color: #0000FF;">End Class</span></span><span style="color: #000000;">
</span><span style="color: #008080;">85</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>And last but not least, the client that stops the server.</P>

<span name="cs_wiki_filter" csw_filters="cs">
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">StopServer.cs</span></div><div class="fscCode"><pre ID="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52"><div><!--

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

--><span style="color: #008080;">01</span><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Open_Text').style.display='inline';"/><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_0_67_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_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;">using</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: #0000FF;">using</span><span style="color: #000000;"> Db4objects.Db4o.Messaging;
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">06</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.ClientServer
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Open_Text').style.display='inline';"/></span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_181_1597_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_187_469_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</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: #808080;">///</span><span style="color: #008000;"> stops the db4o Server started with StartServer.
</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: #808080;">///</span><span style="color: #008000;"> This is done by opening a client connection
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> to the server and by sending a StopServer object as
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> a message. StartServer will react in it's
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> processMessage method.
</span><span style="color: #008080;">14</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">15</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">    </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> StopServer : ServerConfiguration
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_523_1595_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_533_671_Open_Text"><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">18</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> stops a db4o Server started with StartServer.
</span><span style="color: #008080;">19</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">///</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;exception cref=&quot;Exception&quot; /&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">21</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/><span style="color: #000000;">        </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">string</span><span style="color: #000000;">[] args)
</span><span style="color: #008080;">22</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_726_1575_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer objectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">;
</span><span style="color: #008080;">24</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;">25</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_809_951_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> connect to the server</span><span style="color: #008000;">
</span><span style="color: #008080;">27</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                objectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenClient(Host, Port, User, Password);
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">29</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">catch</span><span style="color: #000000;"> (Exception e)
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_996_1060_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Console.WriteLine(e.ToString());
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (objectContainer </span><span style="color: #000000;">!=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">null</span><span style="color: #000000;">)
</span><span style="color: #008080;">35</span><span style="color: #000000;"><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Open_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Closed_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Closed_Text').style.display='inline';"/><img id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Closed_Text').style.display='none'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Open_Image').style.display='inline'; document.getElementById('....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Open_Text').style.display='inline';"/>            </span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="....ClientserverCS.ZipsStopServer.Cs_StopServer.Cs_897_52_1127_1565_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">//</span><span style="color: #008000;"> get the messageSender for the IObjectContainer </span><span style="color: #008000;">
</span><span style="color: #008080;">37</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                IMessageSender messageSender </span><span style="color: #000000;">=</span><span style="color: #000000;"> objectContainer.Ext()
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    .Configure().ClientServer().GetMessageSender();
</span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">40</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;"> send an instance of a StopServer object</span><span style="color: #008000;">
</span><span style="color: #008080;">41</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                messageSender.Send(</span><span style="color: #0000FF;">new</span><span style="color: #000000;"> StopServer());
</span><span style="color: #008080;">42</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                
</span><span style="color: #008080;">43</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;"> close the IObjectContainer </span><span style="color: #008000;">
</span><span style="color: #008080;">44</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                objectContainer.Close();
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">46</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #008000;">//</span><span style="color: #008000;"> end Main</span><span style="color: #008000;">
</span><span style="color: #008080;">48</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/></span><span style="color: #000000;">    }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">49</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">StopServer.vb</span></div><div class="fscCode"><pre ID="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52"><div><!--

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

--><span style="color: #008080;">01</span><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #008000;">'</span><span style="color: #008000;"> Copyright (C) 2007 db4objects Inc. http://www.db4o.com</span><span style="color: #008000;">
</span><span style="color: #008080;">02</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/></span><span style="color: #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: #008080;">04</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;">05</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.Config
</span><span style="color: #008080;">06</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.Messaging
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/>
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Open_Text').style.display='inline';"/></span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Namespace Db4objects</span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_163_1645_Open_Text"><span style="color: #0000FF;">Namespace</span><span style="color: #000000;"> Db4objects.Db4odoc.ClientServer
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Open_Text').style.display='inline';"/>    </span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_209_491_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&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: #808080;">'''</span><span style="color: #008000;"> stops the db4o Server started with StartServer.
</span><span style="color: #008080;">11</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> This is done by opening a client connection
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> to the server and by sending a StopServer object as
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> a message. StartServer will react in it's
</span><span style="color: #008080;">14</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> processMessage method.
</span><span style="color: #008080;">15</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>    </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">16</span><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Open_Text').style.display='inline';"/><span style="color: #000000;">    </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class StopServer</span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_502_1631_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> StopServer
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #0000FF;">Inherits</span><span style="color: #000000;"> ServerConfiguration
</span><span style="color: #008080;">18</span><span style="color: #000000;"><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Open_Text').style.display='inline';"/>        </span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_564_702_Open_Text"><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">19</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> stops a db4o Server started with StartServer.
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;/summary&gt;</span><span style="color: #008000;">
</span><span style="color: #008080;">21</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>        </span><span style="color: #808080;">'''</span><span style="color: #008000;"> </span><span style="color: #808080;">&lt;exception cref=&quot;Exception&quot; /&gt;</span><span style="color: #808080;"></span></span>
<span style="color: #008080;">22</span><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Open_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Open_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Closed_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Closed_Text').style.display='inline';"/><img id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Closed_Image" src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Closed_Text').style.display='none'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Open_Image').style.display='inline'; document.getElementById('....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Open_Text').style.display='inline';"/><span style="color: #000000;">        </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub Main()</span><span id="....ClientserverVB.ZipsStopServer.Vb_StopServer.Vb_1007_52_724_1599_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> Main(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> args </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;">23</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;"> get the messageSender for the IObjectContainer </span><span style="color: #008000;">
</span><span style="color: #008080;">24</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;"> 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;">25</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;"> messageSender </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IMessageSender </span><span style="color: #000000;">=</span><span style="color: #000000;"> configuration.ClientServer().GetMessageSender()
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> objectContainer </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;">
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Try</span><span style="color: #000000;">
</span><span style="color: #008080;">28</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">'</span><span style="color: #008000;"> connect to the server</span><span style="color: #008000;">
</span><span style="color: #008080;">29</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                objectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenClient(configuration, Host, Port, User, Password)
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Catch</span><span style="color: #000000;"> e </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Exception
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                Console.WriteLine(e.ToString())
</span><span style="color: #008080;">32</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;">33</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Not</span><span style="color: #000000;"> objectContainer </span><span style="color: #0000FF;">Is</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Nothing</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">34</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">'</span><span style="color: #008000;"> send an instance of a StopServer object</span><span style="color: #008000;">
</span><span style="color: #008080;">35</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                messageSender.Send(</span><span style="color: #0000FF;">New</span><span style="color: #000000;"> StopServer())
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #008000;">'</span><span style="color: #008000;"> close the IObjectContainer </span><span style="color: #008000;">
</span><span style="color: #008080;">37</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">                objectContainer.Close()
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">If</span><span style="color: #000000;">
</span><span style="color: #008080;">39</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;">40</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;">end Main</span><span style="color: #008000;">
</span><span style="color: #008080;">41</span><span style="color: #008000;"><img src="../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/></span><span style="color: #000000;">    </span><span style="color: #0000FF;">End Class</span></span><span style="color: #000000;">
</span><span style="color: #008080;">42</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>Keywords:</P>
<P>start remote instance</P></div>
    </div>
    <div id="footer">
					This revision (4) was last Modified 2007-12-12T00:45:12 by German Viscuso.
				</div>
  </body>
</html>