Raven.Bundles.Tests.Replication.ReplicationBase.TellInstanceToReplicateToAnotherInstance C# (CSharp) Method

TellInstanceToReplicateToAnotherInstance() protected method

protected TellInstanceToReplicateToAnotherInstance ( int src, int dest ) : void
src int
dest int
return void
        protected void TellInstanceToReplicateToAnotherInstance(int src, int dest)
        {
            using (var session = stores[src].OpenSession())
            {
                session.Store(new replication::Raven.Bundles.Replication.Data.ReplicationDocument
                {
                    Destinations = {new replication::Raven.Bundles.Replication.Data.ReplicationDestination
                    {
                        Url = servers[dest].Database.Configuration.ServerUrl
                    }}
                });
                session.SaveChanges();
            }
        }
    }