/// <summary> /// Initializes a new instance of the <see cref="SyncMechanism"/> class. /// </summary> /// <param name="localSituation">Local situation.</param> /// <param name="remoteSituation">Remote situation.</param> /// <param name="queue">Sync event queue.</param> /// <param name="session">CMIS Session.</param> /// <param name="storage">Meta data storage.</param> /// <param name="transmissionStorage">File transmission storage.</param> /// <param name="activityListener">Active sync progress listener.</param> /// <param name="filters">Ignore filter.</param> /// <param name="solver">Solver for custom solver matrix.</param> public SyncMechanism( ISituationDetection <AbstractFolderEvent> localSituation, ISituationDetection <AbstractFolderEvent> remoteSituation, ISyncEventQueue queue, ISession session, IMetaDataStorage storage, IFileTransmissionStorage transmissionStorage, ActivityListenerAggregator activityListener, IFilterAggregator filters, ISolver[,] solver = null) : base(queue) { if (session == null) { throw new ArgumentNullException("session"); } if (storage == null) { throw new ArgumentNullException("storage"); } if (transmissionStorage == null) { throw new ArgumentNullException("transmissionStorage"); } if (localSituation == null) { throw new ArgumentNullException("localSituation"); } if (remoteSituation == null) { throw new ArgumentNullException("remoteSituation"); } if (activityListener == null) { throw new ArgumentNullException("activityListener"); } if (filters == null) { throw new ArgumentNullException("filters"); } this.session = session; this.storage = storage; this.transmissionStorage = transmissionStorage; this.LocalSituation = localSituation; this.RemoteSituation = remoteSituation; this.activityListener = activityListener; this.filters = filters; this.Solver = solver == null?this.CreateSolver() : solver; }
private SyncMechanism CreateMechanism(ISituationDetection <AbstractFolderEvent> localDetection, ISituationDetection <AbstractFolderEvent> remoteDetection, ISolver[,] solver = null) { if (solver != null) { return(new SyncMechanism(localDetection, remoteDetection, this.queue.Object, this.session.Object, this.storage.Object, this.listener, this.filters.Object, solver)); } else { return(new SyncMechanism(localDetection, remoteDetection, this.queue.Object, this.session.Object, this.storage.Object, this.listener, this.filters.Object)); } }
/// <summary> /// Initializes a new instance of the <see cref="SyncMechanism"/> class. /// </summary> /// <param name="localSituation">Local situation.</param> /// <param name="remoteSituation">Remote situation.</param> /// <param name="queue">Sync event queue.</param> /// <param name="session">CMIS Session.</param> /// <param name="storage">Meta data storage.</param> /// <param name="activityListener">Active sync progress listener.</param> /// <param name="solver">Solver for custom solver matrix.</param> /// <param name="isServerAbleToUpdateModificationDate">Enables the modification date sync feature.</param> public SyncMechanism( ISituationDetection <AbstractFolderEvent> localSituation, ISituationDetection <AbstractFolderEvent> remoteSituation, ISyncEventQueue queue, ISession session, IMetaDataStorage storage, ActivityListenerAggregator activityListener, IFilterAggregator filters, ISolver[,] solver = null, bool isServerAbleToUpdateModificationDate = false) : base(queue) { if (session == null) { throw new ArgumentNullException("Given session is null"); } if (storage == null) { throw new ArgumentNullException("Given storage is null"); } if (localSituation == null) { throw new ArgumentNullException("Given local situation detection is null"); } if (remoteSituation == null) { throw new ArgumentNullException("Given remote situation detection is null"); } if (activityListener == null) { throw new ArgumentNullException("Given activity listener is null"); } if (filters == null) { throw new ArgumentNullException("Given filter aggregator is null"); } this.session = session; this.storage = storage; this.LocalSituation = localSituation; this.RemoteSituation = remoteSituation; this.activityListener = activityListener; this.isServerAbleToUpdateModificationDate = isServerAbleToUpdateModificationDate; this.filters = filters; this.Solver = solver == null?this.CreateSolver() : solver; }
/// <summary> /// Initializes a new instance of the <see cref="SyncMechanism"/> class. /// </summary> /// <param name="localSituation">Local situation.</param> /// <param name="remoteSituation">Remote situation.</param> /// <param name="queue">Sync event queue.</param> /// <param name="session">CMIS Session.</param> /// <param name="storage">Meta data storage.</param> /// <param name="transmissionStorage">File transmission storage.</param> /// <param name="activityListener">Active sync progress listener.</param> /// <param name="filters">Ignore filter.</param> /// <param name="solver">Solver for custom solver matrix.</param> public SyncMechanism( ISituationDetection<AbstractFolderEvent> localSituation, ISituationDetection<AbstractFolderEvent> remoteSituation, ISyncEventQueue queue, ISession session, IMetaDataStorage storage, IFileTransmissionStorage transmissionStorage, ActivityListenerAggregator activityListener, IFilterAggregator filters, ISolver[,] solver = null) : base(queue) { if (session == null) { throw new ArgumentNullException("session"); } if (storage == null) { throw new ArgumentNullException("storage"); } if (transmissionStorage == null) { throw new ArgumentNullException("transmissionStorage"); } if (localSituation == null) { throw new ArgumentNullException("localSituation"); } if (remoteSituation == null) { throw new ArgumentNullException("remoteSituation"); } if (activityListener == null) { throw new ArgumentNullException("activityListener"); } if (filters == null) { throw new ArgumentNullException("filters"); } this.session = session; this.storage = storage; this.transmissionStorage = transmissionStorage; this.LocalSituation = localSituation; this.RemoteSituation = remoteSituation; this.activityListener = activityListener; this.filters = filters; this.Solver = solver == null ? this.CreateSolver() : solver; }
private SyncMechanism CreateMechanism(ISituationDetection<AbstractFolderEvent> localDetection, ISituationDetection<AbstractFolderEvent> remoteDetection, ISolver[,] solver = null) { if (solver != null) { return new SyncMechanism(localDetection, remoteDetection, this.queue.Object, this.session.Object, this.storage.Object, this.fileTransmissionStorage.Object, this.listener, this.filters.Object, solver); } else { return new SyncMechanism(localDetection, remoteDetection, this.queue.Object, this.session.Object, this.storage.Object, this.fileTransmissionStorage.Object, this.listener, this.filters.Object); } }