It's all about the answers!

Ask a question

Detect if a stream differs from a snapshot

David Rostocil (911410) | asked May 27 '10, 3:42 p.m.
I need to know if a stream is different than a given snapshot programatically. I have implemented a solution but I'm not convinced its the best way to approach the problem. Here is some quick pseudo code describing how I currently do this:

If any of the following are true, there are changes:
- the difference between the number of components in the stream and the number of baselines in the snapshot is non-zero
- each component that exists in the stream does not have a corresponding baseline in the snapshot
- if there are any incoming or outgoing changesets or baselines after executing a IWorkspaceConnection.compareToBaseline() call

Is this the best way to compare a stream to a snapshot? Is there a better interface to do this type of comparison? Have I covered all the bases necessary to ensure there are no changes?

Thanks for your help!

Be the first one to answer this question!

Register or to post your answer.