ArcGIS Pro 2.9 API Reference Guide
CreateCompositeOperation Method

ArcGIS.Desktop.Framework Namespace > OperationManager Class : CreateCompositeOperation Method
The method to call.
The name of the new operation.
Groups existing operations into a single composite operation. This method must be called on the primary worker thread. Use QueuedTask.Run.
Syntax
public void CreateCompositeOperation( 
   Action action,
   string name
)
Public Sub CreateCompositeOperation( _
   ByVal action As Action, _
   ByVal name As String _
) 

Parameters

action
The method to call.
name
The name of the new operation.
Exceptions
ExceptionDescription
This method or property must be called within the lambda passed to QueuedTask.Run
Remarks

Many API calls will automatically create operations and add them to the appropriate operation stack (OperationManager). If your function produces adds several operations to the stack and you instead only want to see one operation, use this function to group them.

Note, operations belonging to different categories cannot be interleaved. When a composite operation is being created, every operation belonging to a different ArcGIS.Desktop.Framework.Contracts.Operation.Category will start a new ArcGIS.Desktop.Framework.Contracts.CompositeOperation. For example, if your method calls five functions (A [category: Editing], B [Editing], C [Mapping], D [Mapping], E [Editing]), three composite operations will be created as two additional category shifts have occurred (Editing, Mapping, Editing).

Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

OperationManager Class
OperationManager Members
Run(Action,Progressor,TaskCreationOptions) Method