ArcGIS Pro 2.6 API Reference Guide
Do Method (OperationManager)

ArcGIS.Desktop.Framework Namespace > OperationManager Class : Do Method
The operation to perform.
Performs the specified operation synchronously and adds it to the undo stack.
Syntax
public virtual bool Do( 
   Operation operation
)
Public Overridable Function Do( _
   ByVal operation As Operation _
) As Boolean

Parameters

operation
The operation to perform.

Return Value

Returns true if the operation was completed successfully.
Exceptions
ExceptionDescription
Thrown when an invalid operation is passed in.
Remarks

The specified operation is performed by calling its ArcGIS.Desktop.Framework.Contracts.Operation.Do method and the operation is added to this OperationManager's undo stack. If operations are currently being grouped by means of CreateCompositeOperation, the operation will not directly appear on the stack and will instead be incorporated into the composite operation created.

Whenever an operation is completed via DoAsync or Do, the redo stack is cleared of all operations belonging to the same category.

Requirements

Target Platforms: Windows 10, Windows 8.1, Windows 7

See Also

Reference

OperationManager Class
OperationManager Members