Beispiel #1
0
        /// <summary>
        /// Create an agent based on orchestrators. The remote orchestrator could be of type RemoteOrchestrator (TCP connection) our WebClientOrchestrator (Http connection)
        /// </summary>
        /// <param name="localOrchestrator">local orchestrator using a local provider</param>
        /// <param name="remoteOrchestrator">remote orchestrator : RemoteOrchestrator or WebClientOrchestrator) </param>
        /// <param name="setup">Contains list of your tables. Not used if remote orchestrator is WebClientOrchestrator</param>
        /// <param name="options">Options. Only used on locally if remote orchestrator is WebClientOrchestrator</param>
        public SyncAgent(LocalOrchestrator localOrchestrator, IRemoteOrchestrator remoteOrchestrator,
                         SyncSetup setup = null, SyncOptions options = null)
        {
            if (remoteOrchestrator.Provider != null && !remoteOrchestrator.Provider.CanBeServerProvider)
            {
                throw new NotSupportedException();
            }

            // tables to add
            this.Setup = setup ?? new SyncSetup();

            // Create sync options if needed
            this.Options = options ?? new SyncOptions();

            // Add parameters
            this.Parameters = new SyncParameters();

            // Affect local and remote orchestrators
            this.LocalOrchestrator  = localOrchestrator;
            this.RemoteOrchestrator = remoteOrchestrator;
        }
Beispiel #2
0
 /// <summary>
 /// Create an agent where the remote orchestrator could be of type RemoteOrchestrator (TCP connection) or WebClientOrchestrator (Http connection)
 /// </summary>
 /// <param name="clientProvider">local provider to your client database</param>
 /// <param name="remoteOrchestrator">remote orchestrator : RemoteOrchestrator or WebClientOrchestrator) </param>
 /// <param name="setup">Contains list of your tables. Not used if remote orchestrator is WebClientOrchestrator</param>
 /// <param name="options">Options. Only used on locally if remote orchestrator is WebClientOrchestrator</param>
 public SyncAgent(CoreProvider clientProvider, IRemoteOrchestrator remoteOrchestrator,
                  SyncSetup setup = null, SyncOptions options = null)
     : this(new LocalOrchestrator(clientProvider), remoteOrchestrator, setup, options)
 {
 }
Beispiel #3
0
        /// <summary>
        /// Create an agent based on orchestrators. The remote orchestrator could be of type RemoteOrchestrator (TCP connection) our WebClientOrchestrator (Http connection)
        /// </summary>
        /// <param name="localOrchestrator">local orchestrator using a local provider</param>
        /// <param name="remoteOrchestrator">remote orchestrator : RemoteOrchestrator or WebClientOrchestrator) </param>
        /// <param name="tables">tables list</param>
        public SyncAgent(LocalOrchestrator localOrchestrator, IRemoteOrchestrator remoteOrchestrator, string[] tables)
            : this(localOrchestrator, remoteOrchestrator, new SyncSetup(tables))

        {
        }