Click or drag to resize

BcfDataSetEnableFileUndoSession Method

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

Namespace:  CalculationWorks.BusinessModel
Assembly:  CalculationWorks.BusinessModel (in CalculationWorks.BusinessModel.dll) Version: 4.2.0
Syntax
public void EnableFileUndoSession(
	Stream indexFile,
	Stream dataFile,
	byte[] customHeader
)

Parameters

indexFile
Type: System.IOStream
A navigable (file-) Stream.
dataFile
Type: System.IOStream
A navigable (file-) Stream.
customHeader
Type: SystemByte
An optional custom header extension for index file.
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 undo serializing historic BcfRow and Value objects.

Unlike EnableFileUndo(Stream, Stream) this method adds the current data to the files. So a terminated session can be restored including the undo history. See RestoreUndoRepository(Stream, Stream).

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