ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Framework.Threading.Tasks Namespace / Progressor Class
Members Example

In This Topic
    Progressor Class
    In This Topic
    Used by the executing Task to detect cancellation and update status information displayed the progress dialog during execution.
    Object Model
    Progressor ClassProgressor ClassProgressor Class
    Syntax
    public class Progressor 
    Public Class Progressor 
    Example
    Progressor - Simple and non-cancelable
    public async Task Progressor_NonCancelable()
    {
      ArcGIS.Desktop.Framework.Threading.Tasks.ProgressorSource ps = new ArcGIS.Desktop.Framework.Threading.Tasks.ProgressorSource("Doing my thing...", false);
    
      int numSecondsDelay = 5;
      //If you run this in the DEBUGGER you will NOT see the dialog
      await ArcGIS.Desktop.Framework.Threading.Tasks.QueuedTask.Run(() => Task.Delay(numSecondsDelay * 1000).Wait(), ps.Progressor);
    }
    
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Framework.Threading.Tasks.Progressor
          ArcGIS.Desktop.Framework.Threading.Tasks.CancelableProgressor

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also