Esempio n. 1
0
 public override void EndSession(
     SyncSessionContext syncSessionContext)
 {
     this.syncSessionContext = null;
     this.client.EndSession();
     this.client.Close();
     this.client = null;
 }
Esempio n. 2
0
        public RemoteProviderProxy(int companyId, string storeId, string endpointConfigurationName, string syncDataServiceName)
        {
            this.syncDataServiceName       = syncDataServiceName;
            this.endpointConfigurationName = endpointConfigurationName;
            _companyId = companyId;
            _storeId   = storeId;
            // Create a client
            this.client = new PosServerDbSyncServiceClient(
                endpointConfigurationName);

            this.client.CreateProviderForSyncSession(companyId, storeId, syncDataServiceName);
            this.idFormats = this.client.GetIdFormats();
        }
Esempio n. 3
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();
        }