Click or drag to resize

BcfDataSetEnableFileUndo Method

Enables collecting data-changes (collecting data for Undo(Int32) and Redo(Int32)) in streams.

Namespace:  CalculationWorks.BusinessModel
Assembly:  CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntax
public void EnableFileUndo(
	Stream indexFile,
	Stream dataFile
)

Parameters

indexFile
Type: System.IOStream
A navigable (file-) Stream.
dataFile
Type: System.IOStream
A navigable (file-) Stream.
Exceptions
ExceptionCondition
ArgumentNullExceptionindexFile or dataFile is .
ArgumentExceptionindexFile or dataFile are not navigable.
ObjectDisposedExceptionThis BcfDataSet is disposed.
InvalidOperationException

BcfDataSet is Locked.

or

UndoSerializationService is

or

CurrentTransaction is not

or

Undo is already enabled.

Remarks

This method enables collecting data-changes by serializing historic BcfRow and Value objects.

Serialization causes a noticeable performance impact but scales much better than in memory undo.

While in-memory undo can handle non-serializable data types; you have to use BcfSurrogateConverterT, TSurrogate or set IncludeInUndo= to handle non-serializable data types.

Note Note
Because several limitations targeting .net native; many scenarios using types other than primitives like int, string etc. may cause serialization issues (MSDN).
See Also