Synergex.SynergyDE.Select.ChangeTracking class missing the option to Free Snapshot
As per the documentation:
"The ChangeTracking class returns snapshot information for a file, enabling you to perform change tracking functions from within your program rather than spawning a ctutl command."
A glaring omission here is the ability to "Free" a snapshot.
The "ApplySnapshot" method creates a new Snapshot (and does NOT inform you of the Snapshot number newly created), but there is then no way to retire old Snapshots without resorting to spawning a ctutl command. If I have to spawn ctutl for one of the core functionalities of using Snapshots than the ChangeTracking class has failed to meet the first line of the documentated purpose of the class.
My current design pattern looks like this:
1. Retrieve the Snapshot number create by my previous execution. (This is stored in a file as we have plans for a separate process which may also be using Snapshots)
2. Use "ChangeTracking.ApplySnapshot" to finish the current SnapShot and start the new one.
3. Retrieve the last entry from the ChangeTracking.SnapShots field (array) as this will hopefully be my newly created snapshot.
4. Use Synergex.SynergyDE.Select.Where.NetChange to get the changes between snapshots
5. Determine which old SnapShots can be deleted (As only the oldest SnapShots can be removed, this will need to be some centralised register for all possible processes that might also be using SnapShots. This will allow the oldest unneeded snapshots are removed)
6. Delete/Free the oldest SnapShots by Spawning ctutl -f [n]
8/5/2020 7:18 PM 0