Table of Contents

Method Change

Namespace
OpenCAD2D.SheetSets
Assembly
OpenCAD2D.Core.dll

Change(Action<CadSheetSet>)

Changes the sheet set and saves it: reloads the file first where it has moved on disk, runs the edit on the (fresh) SheetSet, and where the edit changed anything writes the file at once and raises the FileRevision by one. An edit that throws, or a save that fails, leaves the file and the tree as they were and the exception goes on.

public void Change(Action<CadSheetSet> edit)

Parameters

edit Action<CadSheetSet>

The edit, given the sheet set to change.

Exceptions

ArgumentNullException

Thrown when the edit is null.

InvalidOperationException

Thrown when called from inside an edit, or where the set is read-only (IsReadOnly).

ArgumentException

Thrown when the saved tree would hold a character a sheet set data file cannot hold (a control character other than tab, line feed and carriage return).