PostSharp 2023.0 / / Post­Sharp Documentation / API Reference / Post­Sharp.​Patterns.​Recording Namespace / Recorder Class / Recorder Methods / Recorder.​Add­Restore­Point Method

Recorder.AddRestorePoint Method

Adds new restore point with given name.

Namespace:  PostSharp.Patterns.Recording
Assembly:  PostSharp.Patterns.Model (in PostSharp.Patterns.Model.dll) Version: 2023.0.3.0 (2023.0.3.0)
public RestorePoint AddRestorePoint(
	string name = null


name (Optional)
Type: System.String
The name of the restore point, or null to create an unnamed restore point.

Return Value

Type: RestorePoint
The newly created RestorePoint.

A RestorePoint can be used as an argument to the UndoTo(Operation) or RedoTo(Operation) method.

To remove a RestorePoint from UndoOperations or RedoOperations, call the Remove() method.

See Also