public void OnReplicate(IReplicationEvent replicationEvent)
 {
     if (replicationEvent.IsConflict())
     {
         IObjectState stateOfTheDesktop = replicationEvent.StateInProviderA();
         replicationEvent.OverrideWith(stateOfTheDesktop);
     }
 }
 public void OnReplicate(IReplicationEvent @event)
 {
     Assert.IsTrue(@event.IsConflict());
     if (@event.IsConflict())
     {
         @event.OverrideWith(@event.StateInProviderB());
     }
 }
            public void OnReplicate(IReplicationEvent @event)
            {
                invoked.SetValue(true);
                IObjectState stateA = @event.StateInProviderA();
                IObjectState stateB = @event.StateInProviderB();

                Assert.IsTrue(stateA.IsNew());
                Assert.IsTrue(!stateB.IsNew());
                Assert.IsNotNull(stateA.GetObject());
                Assert.IsNull(stateB.GetObject());
                @event.OverrideWith(null);
            }
            public void OnReplicate(IReplicationEvent replicationEvent)
            {
                IObjectState stateInDesktop = replicationEvent.StateInProviderA();

                if (stateInDesktop.IsNew())
                {
                    Console.WriteLine("Object '{0}' is new on desktop database",
                                      stateInDesktop.GetObject());
                }
                if (stateInDesktop.WasModified())
                {
                    Console.WriteLine("Object '{0}' was modified on desktop database",
                                      stateInDesktop.GetObject());
                }
            }
            public void OnReplicate(IReplicationEvent e)
            {
                if (this._enclosing._containerStateToPrevail == null)
                {
                    e.OverrideWith(null);
                    return;
                }
                if (this._enclosing._containerStateToPrevail.IsEmpty())
                {
                    return;
                }
                IObjectState @override = this._enclosing._containerStateToPrevail.Contains(ReplicationFeaturesMain
                                                                                           .AStuff) ? e.StateInProviderA() : e.StateInProviderB();

                e.OverrideWith(@override);
            }
		public virtual void OnReplicate(IReplicationEvent e)
		{
			if (e.IsConflict())
			{
				if (!e.StateInProviderA().IsKnown())
				{
					e.OverrideWith(e.StateInProviderB());
				}
				else
				{
					if (!e.StateInProviderB().IsKnown())
					{
						e.OverrideWith(e.StateInProviderA());
					}
				}
			}
		}
Example #7
0
 public virtual void OnReplicate(IReplicationEvent e)
 {
     if (e.IsConflict())
     {
         if (!e.StateInProviderA().IsKnown())
         {
             e.OverrideWith(e.StateInProviderB());
         }
         else
         {
             if (!e.StateInProviderB().IsKnown())
             {
                 e.OverrideWith(e.StateInProviderA());
             }
         }
     }
 }
            public void OnReplicate(IReplicationEvent replicationEvent)
            {
                if (replicationEvent.IsConflict())
                {
                    IObjectState stateOfTheDesktop = replicationEvent.StateInProviderA();
                    IObjectState stateOfTheMobile  = replicationEvent.StateInProviderB();

                    if (stateOfTheDesktop.ModificationDate() >= stateOfTheMobile.ModificationDate())
                    {
                        replicationEvent.OverrideWith(stateOfTheDesktop);
                    }
                    else
                    {
                        replicationEvent.OverrideWith(stateOfTheMobile);
                    }
                }
            }
			public void OnReplicate(IReplicationEvent @event)
			{
				invoked.SetValue(true);
				IObjectState stateA = @event.StateInProviderA();
				IObjectState stateB = @event.StateInProviderB();
				Assert.IsTrue(stateA.IsNew());
				Assert.IsTrue(!stateB.IsNew());
				Assert.IsNotNull(stateA.GetObject());
				Assert.IsNull(stateB.GetObject());
				@event.OverrideWith(null);
			}
 public void OnReplicate(IReplicationEvent @event)
 {
     Assert.IsTrue(@event.IsConflict());
     @event.OverrideWith(null);
 }
            public void OnReplicate(IReplicationEvent replicationEvent)
            {
                if (replicationEvent.IsConflict())
                {
                    IObjectState stateOfTheDesktop = replicationEvent.StateInProviderA();
                    IObjectState stateOfTheMobile = replicationEvent.StateInProviderB();

                    if (stateOfTheDesktop.ModificationDate() >= stateOfTheMobile.ModificationDate())
                    {
                        replicationEvent.OverrideWith(stateOfTheDesktop);
                    }
                    else
                    {
                        replicationEvent.OverrideWith(stateOfTheMobile);
                    }
                }
            }
 public void OnReplicate(IReplicationEvent @event)
 {
 }
Example #13
0
 public virtual void OnReplicate(IReplicationEvent e)
 {
 }
			public void OnReplicate(IReplicationEvent @event)
			{
				Assert.IsTrue(@event.IsConflict());
				@event.OverrideWith(null);
			}
			public void OnReplicate(IReplicationEvent @event)
			{
				Assert.IsTrue([email protected]());
				@event.OverrideWith(@event.StateInProviderB());
			}
 public void OnReplicate(IReplicationEvent replicationEvent)
 {
     if (replicationEvent.IsConflict())
     {
         IObjectState stateOfTheDesktop = replicationEvent.StateInProviderA();
         replicationEvent.OverrideWith(stateOfTheDesktop);
     }
 }
		public virtual void OnReplicate(IReplicationEvent e)
		{
		}
			public void OnReplicate(IReplicationEvent e)
			{
				if (this._enclosing._containerStateToPrevail == null)
				{
					e.OverrideWith(null);
					return;
				}
				if (this._enclosing._containerStateToPrevail.IsEmpty())
				{
					return;
				}
				IObjectState @override = this._enclosing._containerStateToPrevail.Contains(ReplicationFeaturesMain
					.AStuff) ? e.StateInProviderA() : e.StateInProviderB();
				e.OverrideWith(@override);
			}
			public void OnReplicate(IReplicationEvent @event)
			{
			}
 public void OnReplicate(IReplicationEvent replicationEvent)
 {
     IObjectState stateInDesktop = replicationEvent.StateInProviderA();
     if (stateInDesktop.IsNew())
     {
         Console.WriteLine("Object '{0}' is new on desktop database",
             stateInDesktop.GetObject());
     }
     if (stateInDesktop.WasModified())
     {
         Console.WriteLine("Object '{0}' was modified on desktop database", 
             stateInDesktop.GetObject());
     }
 }