Go Back
2 Votes

Synergex.SynergyDE.Select.ChangeTracking class missing the option to Free Snapshot


Closed

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]
 

1 Comment | Posted by Micheal Pepper to Synergy .NET on 1/29/2020, 10:10 PM
Phillip Bratt
We make it our goal to make the runtime as light-weight as possible to make considerations for it running on devices and for click once applications. To implement the requested feature would add a considerable amount of code into the runtime. We believe the current design of including this functionality in an external program to be the best approach to maintaining runtime performance.
 

8/5/2020, 7:18 PM   0  
Please log in to comment on this idea.