Sophie

Sophie

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

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

<html>
  <head>
    <META http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>Conflict Resolution</title>
    <link rel="stylesheet" type="text/css" href="../../../../style.css">
  </head>
  <body>
    <div class="CommonContent">
      <div class="CommonContentArea">
        <h1>Conflict Resolution</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>The most popular usage of replication callback events is conflict resolution. When an object was changed in both replicating databases you must have a strategy to decide, which value must be final. In the simplest case one of the databases is made "dominant" and the changes in this database always override other changes. The following example demonstrates this behavior:</p>
<p>&nbsp;</p>
<p><span name="cs_wiki_filter" csw_filters="cs">&nbsp;</p>
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">EventsExample.cs: <span class="fscMemberName">ConflictResolutionExample</span></span></div><div class="fscCode"><pre ID="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75"><div><!--

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

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">static</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> ConflictResolutionExample()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Open_Text').style.display='inline';"/>        </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_56_3105_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            Db4oFactory.Configure().GenerateUUIDs(ConfigScope.GLOBALLY);
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            Db4oFactory.Configure().GenerateVersionNumbers(ConfigScope.GLOBALLY);
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">//</span><span style="color: #008000;">  Open databases</span><span style="color: #008000;">
</span><span style="color: #008080;">06</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            IObjectContainer desktop </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">desktop.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectContainer handheld </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">handheld.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            Pilot pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Scott Felton</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">200</span><span style="color: #000000;">);
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Set(pilot);
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Commit();
</span><span style="color: #008080;">12</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Open_Text').style.display='inline';"/>            </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_534_643_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Clean the reference cache to make sure that objects in memory
</span><span style="color: #008080;">13</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            * won't interfere
</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: #008000;">*/</span></span><span style="color: #000000;">
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Ext().Refresh(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot), System.Int32.MaxValue);
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">17</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Open_Text').style.display='inline';"/>            </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_731_1073_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> Replicate changes from handheld to desktop
</span><span style="color: #008080;">18</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>             * Note, that only objects replicated from one database to another will 
</span><span style="color: #008080;">19</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>             * be treated as the same. If you will create an object and save it to both
</span><span style="color: #008080;">20</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>             * databases, dRS will count them as 2 different objects with identical 
</span><span style="color: #008080;">21</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>             * fields.
</span><span style="color: #008080;">22</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>             </span><span style="color: #008000;">*/</span></span><span style="color: #000000;">
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IReplicationSession replication </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4objects.Drs.Replication.Begin(handheld, desktop);
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            IObjectSet changedObjects </span><span style="color: #000000;">=</span><span style="color: #000000;"> replication.ProviderA().ObjectsChangedSinceLastReplication();
</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;">while</span><span style="color: #000000;"> (changedObjects.HasNext())
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                replication.Replicate(changedObjects.Next());
</span><span style="color: #008080;">27</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication.Commit();
</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 src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">//</span><span style="color: #008000;"> change object on the handheld</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: #000000;">            pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> (Pilot)handheld.Query(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot)).Next();
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            pilot.Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">S.Felton</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Set(pilot);
</span><span style="color: #008080;">33</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Commit();
</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: #008080;">35</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;">  change object on the desktop</span><span style="color: #008000;">
</span><span style="color: #008080;">36</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> (Pilot)desktop.Query(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot)).Next();
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            pilot.Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Scott</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">;
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.Set(pilot);
</span><span style="color: #008080;">39</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.Commit();
</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: #008080;">41</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Open_Text').style.display='inline';"/>            </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">/**/</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_1846_2100_Open_Text"><span style="color: #008000;">/*</span><span style="color: #008000;"> The replication will face a conflict: Pilot object was changed on the 
</span><span style="color: #008080;">42</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            * handheld and on the desktop.
</span><span style="color: #008080;">43</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            * To resolve this conflict we will add an event handler, which makes
</span><span style="color: #008080;">44</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            * desktop changes dominating.
</span><span style="color: #008080;">45</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            </span><span style="color: #008000;">*/</span></span><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"/>            IReplicationEventListener listener </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">new</span><span style="color: #000000;"> ConflictReplicationEventListener();
</span><span style="color: #008080;">47</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4objects.Drs.Replication.Begin(handheld, desktop, listener);
</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: #008080;">49</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;">The state of the desktop after the replication should not change, as it dominates</span><span style="color: #008000;">
</span><span style="color: #008080;">50</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            changedObjects </span><span style="color: #000000;">=</span><span style="color: #000000;"> replication.ProviderA().ObjectsChangedSinceLastReplication();
</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;">while</span><span style="color: #000000;"> (changedObjects.HasNext())
</span><span style="color: #008080;">52</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                replication.Replicate(changedObjects.Next());
</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: #008000;">//</span><span style="color: #008000;">Commit</span><span style="color: #008000;">
</span><span style="color: #008080;">55</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            replication.Commit();
</span><span style="color: #008080;">56</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication.Close();
</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: #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;"> Check what we've got on the desktop</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;">            IObjectSet result </span><span style="color: #000000;">=</span><span style="color: #000000;"> desktop.Query(</span><span style="color: #0000FF;">typeof</span><span style="color: #000000;">(Pilot));
</span><span style="color: #008080;">60</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            System.Console.WriteLine(result.Size());
</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: #0000FF;">while</span><span style="color: #000000;"> (result.HasNext())
</span><span style="color: #008080;">62</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Open_Text').style.display='inline';"/>            </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictResolutionExample_458_75_2879_2951_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">63</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                System.Console.WriteLine(result.Next());
</span><span style="color: #008080;">64</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;">65</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Close();
</span><span style="color: #008080;">66</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.Close();
</span><span style="color: #008080;">67</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">68</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">handheld.db4o</span><span style="color: #800000;">&quot;</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"/>            File.Delete(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">desktop.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">);
</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: #008080;">71</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">EventsExample.cs: <span class="fscMemberName">ConflictReplicationEventListener</span></span></div><div class="fscCode"><pre ID="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82"><div><!--

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

--><span style="color: #008080;">01</span><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/None.gif" align="top"/><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">class</span><span style="color: #000000;"> ConflictReplicationEventListener : Db4objects.Drs.IReplicationEventListener
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Open_Text').style.display='inline';"/>        </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_97_418_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">virtual</span><span style="color: #000000;"> </span><span style="color: #0000FF;">void</span><span style="color: #000000;"> OnReplicate(Db4objects.Drs.IReplicationEvent e)
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Open_Text').style.display='inline';"/>            </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_191_408_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">05</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">if</span><span style="color: #000000;"> (e.IsConflict())
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Open_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Closed_Text').style.display='inline';"/><img id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Closed_Text').style.display='none'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Open_Image').style.display='inline'; document.getElementById('..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Open_Text').style.display='inline';"/>                </span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">...</span><span id="..DRSEventsCS.ZipsEventsExample.Cs_EventsExample.Cs_ConflictReplicationEventListener_535_82_245_394_Open_Text"><span style="color: #000000;">{
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    IObjectState chosenObjectState </span><span style="color: #000000;">=</span><span style="color: #000000;"> e.StateInProviderB();
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    e.OverrideWith(chosenObjectState);
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>                }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockEnd.gif" align="top"/>            }</span></span><span style="color: #000000;">
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        }</span></span></div></pre></div></div>
<p></span></p>
<p><span name="cs_wiki_filter" csw_filters="vb">&nbsp;</p>

<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">EventsExample.vb: <span class="fscMemberName">ConflictResolutionExample</span></span></div><div class="fscCode"><pre ID="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71"><div><!--

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

--><span style="color: #008080;">01</span><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Open_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Closed_Text').style.display='inline';"/><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Closed_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Open_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Private</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Shared</span><span style="color: #000000;"> </span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub ConflictResolutionExample()</span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictResolutionExample_697_71_15_3136_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> ConflictResolutionExample()
</span><span style="color: #008080;">02</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            Db4oFactory.Configure().GenerateUUIDs(ConfigScope.GLOBALLY)
</span><span style="color: #008080;">03</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            Db4oFactory.Configure().GenerateVersionNumbers(ConfigScope.GLOBALLY)
</span><span style="color: #008080;">04</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;">  Open databases</span><span style="color: #008000;">
</span><span style="color: #008080;">05</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> desktop </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">desktop.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">06</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> handheld </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectContainer </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4oFactory.OpenFile(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">handheld.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">07</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">08</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> pilot </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> Pilot(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Scott Felton</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">, </span><span style="color: #800080;">200</span><span style="color: #000000;">)
</span><span style="color: #008080;">09</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](pilot)
</span><span style="color: #008080;">10</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Commit()
</span><span style="color: #008080;">11</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> Clean the reference cache to make sure that objects in memory</span><span style="color: #008000;">
</span><span style="color: #008080;">12</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> won't interfere</span><span style="color: #008000;">
</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: #000000;">            
</span><span style="color: #008080;">14</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Ext().Refresh(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot), System.Int32.MaxValue)
</span><span style="color: #008080;">15</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">16</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> Replicate changes from handheld to desktop</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: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> Note, that only objects replicated from one database to another will </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: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> be treated as the same. If you will create an object and save it to both</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: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> databases, dRS will count them as 2 different objects with identical </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: #000000;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> fields.</span><span style="color: #008000;">
</span><span style="color: #008080;">21</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;"> replication </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IReplicationSession </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4objects.Drs.Replication.Begin(handheld, desktop)
</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;">Dim</span><span style="color: #000000;"> changedObjects </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> replication.ProviderA().ObjectsChangedSinceLastReplication()
</span><span style="color: #008080;">23</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">While</span><span style="color: #000000;"> changedObjects.HasNext()
</span><span style="color: #008080;">24</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                replication.Replicate(changedObjects.Next())
</span><span style="color: #008080;">25</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">While</span><span style="color: #000000;">
</span><span style="color: #008080;">26</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication.Commit()
</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 src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #008000;">'</span><span style="color: #008000;"> change object on the handheld</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;">            pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">DirectCast</span><span style="color: #000000;">(handheld.Query(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot)).[</span><span style="color: #0000FF;">Next</span><span style="color: #000000;">](), Pilot)
</span><span style="color: #008080;">30</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            pilot.Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">S.Felton</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">31</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](pilot)
</span><span style="color: #008080;">32</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Commit()
</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: #008000;">'</span><span style="color: #008000;">  change object on the desktop</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;">            pilot </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">DirectCast</span><span style="color: #000000;">(desktop.Query(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot)).[</span><span style="color: #0000FF;">Next</span><span style="color: #000000;">](), Pilot)
</span><span style="color: #008080;">36</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            pilot.Name </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #800000;">&quot;</span><span style="color: #800000;">Scott</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">
</span><span style="color: #008080;">37</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.[</span><span style="color: #0000FF;">Set</span><span style="color: #000000;">](pilot)
</span><span style="color: #008080;">38</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.Commit()
</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;"> The replication will face a conflict: Pilot object was changed on the </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;">            </span><span style="color: #008000;">'</span><span style="color: #008000;"> handheld and on the desktop.</span><span style="color: #008000;">
</span><span style="color: #008080;">42</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;"> To resolve this conflict we will add an event handler, which makes</span><span style="color: #008000;">
</span><span style="color: #008080;">43</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;"> desktop changes dominating.</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: #0000FF;">Dim</span><span style="color: #000000;"> listener </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IReplicationEventListener </span><span style="color: #000000;">=</span><span style="color: #000000;"> </span><span style="color: #0000FF;">New</span><span style="color: #000000;"> ConflictReplicationEventListener()
</span><span style="color: #008080;">45</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication </span><span style="color: #000000;">=</span><span style="color: #000000;"> Db4objects.Drs.Replication.Begin(handheld, desktop, listener)
</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: #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;">The state of the desktop after the replication should not change, as it dominates</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;">            changedObjects </span><span style="color: #000000;">=</span><span style="color: #000000;"> replication.ProviderA().ObjectsChangedSinceLastReplication()
</span><span style="color: #008080;">49</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">While</span><span style="color: #000000;"> changedObjects.HasNext()
</span><span style="color: #008080;">50</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                replication.Replicate(changedObjects.[</span><span style="color: #0000FF;">Next</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">While</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: #008080;">53</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;">Commit</span><span style="color: #008000;">
</span><span style="color: #008080;">54</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            replication.Commit()
</span><span style="color: #008080;">55</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            replication.Close()
</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: #008080;">57</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;"> Check what we've got on the desktop</span><span style="color: #008000;">
</span><span style="color: #008080;">58</span><span style="color: #008000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/></span><span style="color: #000000;">            </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> result </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectSet </span><span style="color: #000000;">=</span><span style="color: #000000;"> desktop.Query(</span><span style="color: #0000FF;">GetType</span><span style="color: #000000;">(Pilot))
</span><span style="color: #008080;">59</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            System.Console.WriteLine(result.Size())
</span><span style="color: #008080;">60</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">While</span><span style="color: #000000;"> result.HasNext()
</span><span style="color: #008080;">61</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                System.Console.WriteLine(result.[</span><span style="color: #0000FF;">Next</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;">End</span><span style="color: #000000;"> </span><span style="color: #0000FF;">While</span><span style="color: #000000;">
</span><span style="color: #008080;">63</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            handheld.Close()
</span><span style="color: #008080;">64</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            desktop.Close()
</span><span style="color: #008080;">65</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>
</span><span style="color: #008080;">66</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">handheld.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</span><span style="color: #008080;">67</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            File.Delete(</span><span style="color: #800000;">&quot;</span><span style="color: #800000;">desktop.db4o</span><span style="color: #800000;">&quot;</span><span style="color: #000000;">)
</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: #008080;">69</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Sub</span></span></div></pre></div></div>&nbsp;</p>
<div class="FormattedSourceCode"><div class="fscHeader"><span class="fscFileName">EventsExample.vb: <span class="fscMemberName">ConflictReplicationEventListener</span></span></div><div class="fscCode"><pre ID="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78"><div><!--

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

--><span style="color: #008080;">1</span><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Open_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Closed_Text').style.display='inline';"/><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Closed_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Open_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Open_Text').style.display='inline';"/><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Class ConflictReplicationEventListener</span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_7_500_Open_Text"><span style="color: #0000FF;">Class</span><span style="color: #000000;"> ConflictReplicationEventListener
</span><span style="color: #008080;">2</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>            </span><span style="color: #0000FF;">Implements</span><span style="color: #000000;"> Db4objects.Drs.IReplicationEventListener
</span><span style="color: #008080;">3</span><span style="color: #000000;"><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Open_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedSubBlockStart.gif" align="top" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Open_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Closed_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Closed_Text').style.display='inline';"/><img id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Closed_Image" src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ContractedSubBlock.gif" align="top" style="display: none;" onClick="this.style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Closed_Text').style.display='none'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Open_Image').style.display='inline'; document.getElementById('..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Open_Text').style.display='inline';"/>            </span><span style="color: #0000FF;">Public</span><span style="color: #000000;"> </span><span style="color: #0000FF;">Overridable</span><span style="color: #000000;"> </span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Closed_Text" style="border: solid 1px #808080; background-color: #FFFFFF; display: none;">Sub OnReplicate()</span><span id="..DRSEventsVB.ZipsEventsExample.Vb_EventsExample.Vb_ConflictReplicationEventListener_780_78_141_482_Open_Text"><span style="color: #0000FF;">Sub</span><span style="color: #000000;"> OnReplicate(</span><span style="color: #0000FF;">ByVal</span><span style="color: #000000;"> e </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> Db4objects.Drs.IReplicationEvent) </span><span style="color: #0000FF;">Implements</span><span style="color: #000000;"> Db4objects.Drs.IReplicationEventListener.OnReplicate
</span><span style="color: #008080;">4</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                </span><span style="color: #0000FF;">If</span><span style="color: #000000;"> e.IsConflict() </span><span style="color: #0000FF;">Then</span><span style="color: #000000;">
</span><span style="color: #008080;">5</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    </span><span style="color: #0000FF;">Dim</span><span style="color: #000000;"> chosenObjectState </span><span style="color: #0000FF;">As</span><span style="color: #000000;"> IObjectState </span><span style="color: #000000;">=</span><span style="color: #000000;"> e.StateInProviderB()
</span><span style="color: #008080;">6</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/InBlock.gif" align="top"/>                    e.OverrideWith(chosenObjectState)
</span><span style="color: #008080;">7</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;">8</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;">9</span><span style="color: #000000;"><img src="../../../../Utility/ActiPro.CodeHighligher/OutliningIndicators/ExpandedBlockEnd.gif" align="top"/>        </span><span style="color: #0000FF;">End Class</span></span></div></pre></div></div>  <br></p>

<p></span> <br>
</p>

</div>
    </div>
    <div id="footer">
					This revision (5) was last Modified 2007-07-09T19:39:39 by Tetyana.
				</div>
  </body>
</html>