public void BeginSession(SyncProviderPosition position)
        {
            this.batchIdToFileMapper = new Dictionary<string, string>();

            this.peerProvider.BeginSession(position, null/*SyncSessionContext*/);
            this.batchCount = 0;
        }
Exemplo n.º 2
0
        public void BeginSession(SyncProviderPosition position)
        {
            this.batchIdToFileMapper = new Dictionary <string, string>();

            this.peerProvider.BeginSession(position, null /*SyncSessionContext*/);
            this.batchCount = 0;
        }
Exemplo n.º 3
0
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            lock (_lock)
            {
                _syncPool.Add(ReplicaId);
            }

            base.BeginSession(position, syncSessionContext);
        }
Exemplo n.º 4
0
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
     try
     {
         this.proxy.BeginSession(position);
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 5
0
        /// <summary>
        /// When overridden in a derived class, notifies the provider that it is joining a synchronization session.
        /// </summary>
        /// <param name="position">The position of this provider, relative to the other provider in the session.</param>
        /// <param name="syncSessionContext">The current status of the corresponding session.</param>
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            if (_syncService == null)
            {
                throw new Exception("Not initalized");
            }

            _syncSessionContext = syncSessionContext;
            _syncService.BeginSession();
        }
        public void BeginSession(SyncProviderPosition position)
        {
            Log("*****************************************************************");
            Log("******************** New Sync Session ***************************");
            Log("*****************************************************************");
            Log("BeginSession: ScopeName: {0}, Position: {1}, Date: {2}", this.peerProvider.ScopeName, position, DateTime.Now);
            //Clean the mapper for each session.
            this.batchIdToFileMapper = new Dictionary <string, string>();

            this.peerProvider.BeginSession(position, null);
            this.batchCount = 0;
        }
Exemplo n.º 7
0
        //BeginSession is called at the beginning of each sync operation.  Do initialization here.  For example update
        //metadata if it was not updated as the actual data was changed.
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            Thread.Sleep(1000);
            InitializeMetadataStore();

            //Make sure the metadata store is updated to reflect the state of the data before each sync operation.
            _metadataStore.BeginTransaction();
            UpdateMetadataStoreWithLocalChanges();
            _metadataStore.CommitTransaction();

            _currentSessionContext = syncSessionContext;
        }
Exemplo n.º 8
0
        public void BeginSession(SyncProviderPosition position)
        {
            Log("*****************************************************************");
            Log("******************** New Sync Session ***************************");
            Log("*****************************************************************");
            Log("BeginSession: ScopeName: {0}, Position: {1}",
                sqlProvider.ScopeName, position);
            //Clean the mapper for each session.
            batchIdToFileMapper = new Dictionary <string, string>();

            sqlProvider.BeginSession(position, null /*SyncSessionContext*/);
            batchCount = 1024;
        }
Exemplo n.º 9
0
 /// <inheritdoc />
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
     if (!syncSessionContext.IsCanceled())
     {
         if (position == SyncProviderPosition.Local)
         {
             m_session.BeginUpdate();
         }
         else
         {
             m_session.BeginRead();
         }
     }
 }
Exemplo n.º 10
0
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            InitializeMetaDataStore();
            ReadDataStore();
            if (_metaDataStore == null || _metaData == null)
            {
                throw new ArgumentNullException("metadata not initialized");
            }
            //Make sure the metadata store is updated to reflect the state of the data before each sync operation.
            BeginTransaction();
            UpdateMetadataStoreWithLocalChanges();
            CommitTransaction();

            _currentSessionContext = syncSessionContext;
        }
Exemplo n.º 11
0
        public override void BeginSession(
            SyncProviderPosition position,
            SyncSessionContext syncSessionContext)
        {
            if (this.client == null)
            {
                // Allow for the same proxy to be use in several unidirectional session
                this.client = new PosServerDbSyncServiceClient(
                    endpointConfigurationName);

                this.client.CreateProviderForSyncSession(_companyId, _storeId, syncDataServiceName);
            }

            this.syncSessionContext = syncSessionContext;
            this.client.BeginSession();
        }
        public override void BeginSession(
            SyncProviderPosition position,
            SyncSessionContext syncSessionContext)
        {
            if (this.client == null)
            {
                // Allow for the same proxy to be use in several unidirectional session
                this.client = new Sync101WebServiceClient(
                    endpointConfigurationName);

                this.client.CreateProviderForSyncSession(folderPath, this.storeName);
            }

            this.syncSessionContext = syncSessionContext;
            this.client.BeginSession();
        }
Exemplo n.º 13
0
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            _metadataStore.BeginSession(_nodeStore.Nodes);

            _currentSessionContext = syncSessionContext;
        }
Exemplo n.º 14
0
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            try
            {
                this.proxy.BeginSession(position);
            }
            catch (Exception)
            {

            }
        }
Exemplo n.º 15
0
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            _metadataStore.BeginSession(_nodeStore.Nodes);

            _currentSessionContext = syncSessionContext;
        }
Exemplo n.º 16
0
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
     syncProxy.BeginSession();
 }
Exemplo n.º 17
0
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
     Proxy.BeginSession(position, syncSessionContext.ChangeApplierInfo);
 }
Exemplo n.º 18
0
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
     _position          = position;
     SyncSessionContext = syncSessionContext;
 }
Exemplo n.º 19
0
        /// <summary>
        /// When overridden in a derived class, notifies the provider that it is joining a synchronization session.
        /// </summary>
        /// <param name="position">The position of this provider, relative to the other provider in the session.</param>
        /// <param name="syncSessionContext">The current status of the corresponding session.</param>
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            if (_syncService == null)
                throw new Exception("Not initalized");

            _syncSessionContext = syncSessionContext;
            _syncService.BeginSession();
        }
Exemplo n.º 20
0
        //BeginSession is called at the beginning of each sync operation.  Do initialization here.  For example update
        //metadata if it was not updated as the actual data was changed.
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            Thread.Sleep(1000);
            InitializeMetadataStore();

            //Make sure the metadata store is updated to reflect the state of the data before each sync operation.
            _metadataStore.BeginTransaction();
            UpdateMetadataStoreWithLocalChanges();
            _metadataStore.CommitTransaction();

            _currentSessionContext = syncSessionContext;
        }
Exemplo n.º 21
0
 /// <inheritdoc />
 public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
 {
   if (!syncSessionContext.IsCanceled())
   {
     if (position == SyncProviderPosition.Local)
       m_session.BeginUpdate();
     else
       m_session.BeginRead();
   }
 }
        //BeginSession is called at the beginning of each sync operation.  Do initialization here.  For example update
        //metadata if it was not updated as the actual data was changed.
        public override void BeginSession(SyncProviderPosition position, SyncSessionContext syncSessionContext)
        {
            BeginSession();

            _currentSessionContext = syncSessionContext;
        }