public void SynchronizePartition(DbTable dbTable, DbPartition partitionToSave, DataSynchronizationPeriod period) { lock (_lockObject) { if (CheckIfWeHaveSyncTableTaskEarlier(dbTable.Name, period)) { return; } if (!_syncPartitions.ContainsKey(dbTable.Name)) { _syncPartitions.Add(dbTable.Name, new Dictionary <string, SyncPartition>()); } var dict = _syncPartitions[dbTable.Name]; if (!dict.ContainsKey(partitionToSave.PartitionKey)) { dict.Add(partitionToSave.PartitionKey, SyncPartition.Create(dbTable, partitionToSave, period)); } } }
public void SynchronizePartition(DbTable dbTable, string partitionKey, DataSynchronizationPeriod period) { EnqueueTask(dbTable, SyncPartition.Create(dbTable, partitionKey, period)); }