BcfDataSetRestoreUndoRepository Method |
[This is preliminary documentation and is subject to change.]
Namespace: CalculationWorks.BusinessModel
Exception | Condition |
---|---|
ArgumentNullException | indexFile or dataFile is null. |
ArgumentException | indexFile or dataFile are not navigable. |
ObjectDisposedException | This BcfDataSet is disposed. |
InvalidOperationException | BcfDataSet is Locked. orUndoSerializationService is null orCurrentTransaction is not null orUndo is already enabled. |
BcfCalculationException | Wraps calculation exceptions if allowed by HandleCalculationException. |
The method restores the repository and returns the last saved undo position. Use the return value to restore the last saved state e.g.
var redoCount = RestoreUndoRepository(IndexFile, DataFile);
Redo(redoCount);
An undo repository created with EnableFileUndoSession(Stream, Stream, Byte) can be restored if:
The method clears data and current undo repository. When restoring failed due to an exception the previous state will not be restored.