Hello,
I'm trying to achieve almost the same as you.
After a "reconcile" then a "post", i want to list all changes posted to the "default" version (for all versioned layers).
So far I subscribed to EditCompletedEvent and then logs what's happening.
System.Diagnostics.Debug.WriteLine("Operation type = " + args.CompletedType);
System.Diagnostics.Debug.WriteLine("Creates: " + args.Creates.Values.Sum(list => list.Count).ToString());
System.Diagnostics.Debug.WriteLine("Modifies: " + args.Modifies.Values.Sum(list => list.Count).ToString());
System.Diagnostics.Debug.WriteLine("Deletes: " + args.Deletes.Values.Sum(list => list.Count).ToString());
On a new version, I modify a feature located in a versioned layer.
When I save
CompletedType = Operation
args.Modifies.Values.Sum(list => list.Count) = 1
When I reconcile
CompletedType = Reconcile
args.Modifies.Values.Sum(list => list.Count) = 0
When I post
CompletedType = Post
args.Modifies.Values.Sum(list => list.Count) = 0
I would like to know why there is nothing in Modifies when I post.
It means I should save all the changes (Rows) in memory, in a dictionary for example (and in a file for persistence if the user close ArcGIS Pro) and when I detect a Post, i save the old values (the ones saved in the dictionary / file) in an other FeatureClass and let the process continues to save in the default version. Looks like what Brian did by subscribing to the RowChangedEvent of each Layer.
Is it possible to detect when the Post of one element did complete ?
Let's say, I made a huge modification on my version and the Post will take minutes. If I close ArcGIS Pro, ArcGIS Pro crashes or I lost the connection with the database, what will happen, a rollback, only X items will be updated ?